summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_b.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp
index 5fcebfde9..0bd8d286d 100644
--- a/src/modes/cmode_b.cpp
+++ b/src/modes/cmode_b.cpp
@@ -105,7 +105,7 @@ std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan
/* Attempt to tidy the mask */
ModeParser::CleanMask(dest);
/* If the mask was invalid, we exit */
- if (dest == "")
+ if (dest == "" || dest.length() > 250)
return dest;
long maxbans = chan->GetMaxBans();
@@ -150,9 +150,6 @@ std::string& ModeChannelBan::DelBan(User *user, std::string& dest, Channel *chan
return dest;
}
- /* 'Clean' the mask, e.g. nick -> nick!*@* */
- ModeParser::CleanMask(dest);
-
for (BanList::iterator i = chan->bans.begin(); i != chan->bans.end(); i++)
{
if (!strcasecmp(i->data.c_str(), dest.c_str()))