summaryrefslogtreecommitdiff
path: root/modules/commands/os_sxline.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-08 21:53:06 -0400
committerAdam <Adam@anope.org>2013-09-08 21:53:06 -0400
commit339f41aebcad011d53da63b0d681a8353226a868 (patch)
treeb4abd90375d05bc77322640236c149ec380b1866 /modules/commands/os_sxline.cpp
parent55e4ef9d3a5dc7e3b616e1369aac01ea1c76780d (diff)
Fix allowing duplicate entries on the snline list
Have proto mods recognize cidr ranges as zlineable IPs Remove operserv/global from global.conf because its dumb Fix example config ~botserv/set example to work as expected
Diffstat (limited to 'modules/commands/os_sxline.cpp')
-rw-r--r--modules/commands/os_sxline.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp
index 7cd3c12ca..62f81d337 100644
--- a/modules/commands/os_sxline.cpp
+++ b/modules/commands/os_sxline.cpp
@@ -333,6 +333,13 @@ class CommandOSSNLine : public CommandOSSXLineBase
}
}
+ /* Clean up the last character of the mask if it is a space
+ * See bug #761
+ */
+ unsigned masklen = mask.length();
+ if (mask[masklen - 1] == ' ')
+ mask.erase(masklen - 1);
+
if (!this->xlm()->CanAdd(source, mask, expires, reason))
return;
else if (mask.find_first_not_of("/.*?") == Anope::string::npos)
@@ -341,13 +348,6 @@ class CommandOSSNLine : public CommandOSSXLineBase
return;
}
- /* Clean up the last character of the mask if it is a space
- * See bug #761
- */
- unsigned masklen = mask.length();
- if (mask[masklen - 1] == ' ')
- mask.erase(masklen - 1);
-
if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty())
reason = "[" + source.GetNick() + "] " + reason;
@@ -391,7 +391,7 @@ class CommandOSSNLine : public CommandOSSXLineBase
user->Kill(Me->GetName(), rreason);
}
- this->xlm()->Send(source.GetUser(), x);
+ this->xlm()->Send(NULL, x);
}
source.Reply(_("\002%s\002 added to the %s list."), mask.c_str(), source.command.c_str());
@@ -623,7 +623,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
}
}
- this->xlm()->Send(source.GetUser(), x);
+ this->xlm()->Send(NULL, x);
}
source.Reply(_("\002%s\002 added to the SQLINE list."), mask.c_str());