File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -346,9 +346,9 @@ if (!("Left4Users" in getroottable()))
346
346
AdminNotice (" \x 04" + " Griefer " + player. GetPlayerName () + " joined" );
347
347
else
348
348
AdminNotice (" \x 01" + " User " + player. GetPlayerName () + " joined" );
349
-
350
- ::Left4Users. HandleMaxHumanPlayers ();
351
349
}
350
+
351
+ ::Left4Users. HandleMaxHumanPlayers ();
352
352
}
353
353
354
354
::Left4Users. AdminNotice <- function (msg)
@@ -461,6 +461,17 @@ if (!("Left4Users" in getroottable()))
461
461
SendToServerConsole (" kickid " + kickid + " " + Left4Lib. Settings . users_full_kick_reason );
462
462
::Left4Lib. Logger . Info (" Player with steam ID " + kickid + " kicked with reason: " + Left4Lib. Settings . users_full_kick_reason );
463
463
464
+ // Must remove the kicked player from OnlineUsers to avoid multiple kick to the same player when multiple joined events in the same frame
465
+ foreach (userid, usr in OnlineUsers)
466
+ {
467
+ if (usr. steamid == kickid)
468
+ {
469
+ delete OnlineUsers[userid];
470
+ ::Left4Lib. Logger . Debug (" Deleted from OnlineUsers" );
471
+ break ;
472
+ }
473
+ }
474
+
464
475
return kickid;
465
476
}
466
477
You can’t perform that action at this time.
0 commit comments