Browse Source

Re-ordered spam control actions to ban before kicking.

tags/3.1.2
Teknikode 3 years ago
parent
commit
198cda8f1c
1 changed files with 10 additions and 10 deletions
  1. 10
    10
      Modules/Spam Control/Spam_Control.cs

+ 10
- 10
Modules/Spam Control/Spam_Control.cs View File

@@ -68,10 +68,6 @@ namespace Combot.Modules.Plugins
{
TimedDeVoice(message, devoiceTime);
}
if (kickResponse)
{
Bot.IRC.Command.SendKick(info.Channel, info.Nick, string.Format("Please do not spam. You have messaged {0} times within {1}ms.", info.Lines, timeThreshold));
}
if (banResponse)
{
if (unbanResponse)
@@ -83,8 +79,12 @@ namespace Combot.Modules.Plugins
BanNick(true, message);
}
}
if (!kickResponse)
if (kickResponse)
{
Bot.IRC.Command.SendKick(info.Channel, info.Nick, string.Format("Please do not spam. You have messaged {0} times within {1}ms.", info.Lines, timeThreshold));
}
else
{
string spamMessage = string.Format("Please do not spam. You have messaged {0} times within {1}ms.", info.Lines, timeThreshold);
SendResponse(MessageType.Channel, message.Channel, message.Sender.Nickname, spamMessage);
}
@@ -160,10 +160,6 @@ namespace Combot.Modules.Plugins
{
TimedDeVoice(message, devoiceTime);
}
if (kickResponse)
{
Bot.IRC.Command.SendKick(info.Channel, info.Nick, string.Format("Please do not highlight spam. You have highlighted {0} nicks within {1}ms.", info.Highlights, timeThreshold));
}
if (banResponse)
{
if (unbanResponse)
@@ -175,7 +171,11 @@ namespace Combot.Modules.Plugins
BanNick(true, message);
}
}
if (!kickResponse)
if (kickResponse)
{
Bot.IRC.Command.SendKick(info.Channel, info.Nick, string.Format("Please do not highlight spam. You have highlighted {0} nicks within {1}ms.", info.Highlights, timeThreshold));
}
else
{
string spamMessage = string.Format("Please do not highlight spam. You have highlighted {0} nicks within {1}ms.", info.Highlights, timeThreshold);
SendResponse(MessageType.Channel, message.Channel, message.Sender.Nickname, spamMessage);

Loading…
Cancel
Save