From 08895e2aa3c1bfe604cf85249ea2ee62743e73ff Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Sat, 4 Sep 2010 19:30:44 -0400 Subject: Do not apply parameter length restrictions or CleanMask when unsetting modes --- src/modes/cmode_b.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/modes') 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())) -- cgit v1.2.3