Browse Source

Modified spam check to not reset session every time, only on spam commands.

tags/3.1.0
Teknikode 4 years ago
parent
commit
d304268c69
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Combot/Bot.cs

+ 1
- 1
Combot/Bot.cs View File

@@ -455,7 +455,6 @@ namespace Combot
// Check the current delay for the module
DateTime curTime = DateTime.Now;
DateTime lastTime = session.LastInstance;
session.LastInstance = curTime;
session.CurrentCount++;
if (curTime.Subtract(lastTime) < ServerConfig.SpamSessionTime)
{
@@ -464,6 +463,7 @@ namespace Combot
if (session.CurrentCount > ServerConfig.SpamCountMax)
{
allowed = false;
session.LastInstance = curTime;
}
}
else

Loading…
Cancel
Save