From 339f41aebcad011d53da63b0d681a8353226a868 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 8 Sep 2013 21:53:06 -0400 Subject: 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 --- modules/commands/os_sxline.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/commands') 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("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()); -- cgit