You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New ban entries would be created for too many wasted server messages, even ban entries for that IP were already present. Now existing ban entries' disconnect count is properly incremented.
Also removed some disabled debug code from yonder.
banIPList.push_back(BanEntry(addr, 1, "Sending too many messages the server is not meant to handle.",
510
-
time(NULL) + 60 * 60));
509
+
auto banEntry = std::find_if(banIPList.begin(), banIPList.end(), [&](const BanEntry& b) { return b.ip == addr; });
510
+
if (banEntry == banIPList.end())
511
+
banIPList.push_back(BanEntry(addr, 1, "Sending too many messages the server is not meant to handle.",
512
+
time(NULL) + 60 * 60));
513
+
else
514
+
++banEntry->disconnects;
511
515
senderclient->send(1, "You have been banned for sending too many server messages that the server is not designed to receive.\r\nContact Phi on Clickteam Discord."sv);
banIPList.push_back(BanEntry(addr, 1, "Sending too many messages the server is not meant to handle.",
618
-
_time64(NULL) + 60LL * 60LL));
600
+
601
+
auto banEntry = std::find_if(banIPList.begin(), banIPList.end(), [&](const BanEntry& b) { return b.ip == addr; });
602
+
if (banEntry == banIPList.end())
603
+
banIPList.push_back(BanEntry(addr, 1, "Sending too many messages the server is not meant to handle.",
604
+
_time64(NULL) + 60LL * 60LL));
605
+
else
606
+
++banEntry->disconnects;
619
607
senderclient->send(1, "You have been banned for sending too many server messages that the server is not designed to receive.\r\nContact Phi on Clickteam Discord."sv);
0 commit comments