summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 21:06:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 21:06:25 +0000
commitd9f48b75602a6363fc5f50c53bd1fc6d1b96e3bd (patch)
tree33464828084a2b41c7cdaad8d8aa38c0a0983f8d /src
parent2fd5ed7aa9e5ac8a8d8e19c07f320306e594a47a (diff)
Make +b use CleanMask()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4146 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modes/cmode_b.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp
index 57e13159d..6dc7f4c37 100644
--- a/src/modes/cmode_b.cpp
+++ b/src/modes/cmode_b.cpp
@@ -45,32 +45,11 @@ std::string& ModeChannelBan::AddBan(userrec *user,std::string &dest,chanrec *cha
return dest;
}
- for (std::string::iterator i = dest.begin(); i != dest.end(); i++)
- {
- if ((*i < 32) || (*i > 126))
- {
- dest = "";
- return dest;
- }
- else if (*i == '!')
- {
- toomanyexclamation++;
- }
- else if (*i == '@')
- {
- toomanyat++;
- }
- }
-
- if (toomanyexclamation != 1 || toomanyat != 1)
- {
- /*
- * this stops sillyness like n!u!u!u@h, though note that most
- * ircds don't actually verify banmask validity. --w00t
- */
- dest = "";
+ /* Attempt to tidy the mask */
+ ModeParser::CleanMask(dest);
+ /* If the mask was invalid, we exit */
+ if (dest == "")
return dest;
- }
long maxbans = GetMaxBans(chan->name);
if ((unsigned)chan->bans.size() > (unsigned)maxbans)