Browse Source

Merge pull request #1025 from diath/fix_ignore_list

Fix saving ignore list and whitelist
Konrad Kuśnierz 1 year ago
parent
commit
e244ba4775
No account linked to committer's email address
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      modules/game_console/console.lua

+ 4
- 4
modules/game_console/console.lua View File

@@ -1202,15 +1202,15 @@ function loadCommunicationSettings()
1202 1202
 
1203 1203
   local ignoreNode = g_settings.getNode('IgnorePlayers')
1204 1204
   if ignoreNode then
1205
-    for i = 1, #ignoreNode do
1206
-      table.insert(communicationSettings.ignoredPlayers, ignoreNode[i])
1205
+    for _, player in pairs(ignoreNode) do
1206
+      table.insert(communicationSettings.ignoredPlayers, player)
1207 1207
     end
1208 1208
   end
1209 1209
 
1210 1210
   local whitelistNode = g_settings.getNode('WhitelistedPlayers')
1211 1211
   if whitelistNode then
1212
-    for i = 1, #whitelistNode do
1213
-      table.insert(communicationSettings.whitelistedPlayers, whitelistNode[i])
1212
+    for _, player in pairs(whitelistNode) do
1213
+      table.insert(communicationSettings.whitelistedPlayers, player)
1214 1214
     end
1215 1215
   end
1216 1216
 

Loading…
Cancel
Save