summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 21:43:21 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 21:43:21 +0000
commitf00094febf62beb74fb45a765a9fccd1ba4c8b8b (patch)
treed532bc5147fc104a75bf75427240dc5056395c97 /src/mode.cpp
parentccea6c12cd10e26c3ccacc91fdc16897d00582de (diff)
The start of extended bans infrastructure: syntax is e.g. +b n:w00tdiff@*, bans of any type can be applied and checked against, but there's more to come with this.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9337 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 83aff70cf..6805c348c 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -705,12 +705,12 @@ void ModeParser::CleanMask(std::string &mask)
std::string::size_type pos_of_pling = mask.find_first_of('!');
std::string::size_type pos_of_at = mask.find_first_of('@');
std::string::size_type pos_of_dot = mask.find_first_of('.');
- std::string::size_type pos_of_colon = mask.find_first_of(':'); /* Because ipv6 addresses are colon delimited */
+ std::string::size_type pos_of_colons = mask.find("::"); /* Because ipv6 addresses are colon delimited -- double so it treats extban as nick */
if ((pos_of_pling == std::string::npos) && (pos_of_at == std::string::npos))
{
- /* Just a nick, or just a host */
- if ((pos_of_dot == std::string::npos) && (pos_of_colon == std::string::npos))
+ /* Just a nick, or just a host - or clearly ipv6 (starting with :) */
+ if ((pos_of_dot == std::string::npos) && (pos_of_colons == std::string::npos) && mask[0] != ':')
{
/* It has no '.' in it, it must be a nick. */
mask.append("!*@*");