diff options
author | Adam <Adam@anope.org> | 2013-05-08 11:30:05 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-08 11:31:20 -0400 |
commit | 912103ec13b712c692f6fecba56d6f08975220f9 (patch) | |
tree | 5e0a403d1a74140181d1970554e26537351a8d47 /modules/commands/os_sxline.cpp | |
parent | f843e7bd9032923bd231bc83536a89d32e59d857 (diff) |
Allow using sxlines on ircds that do not support them, since we always enforce them anyway
Diffstat (limited to 'modules/commands/os_sxline.cpp')
-rw-r--r-- | modules/commands/os_sxline.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp index 55ba83455..dcf7863fe 100644 --- a/modules/commands/os_sxline.cpp +++ b/modules/commands/os_sxline.cpp @@ -250,11 +250,8 @@ class CommandOSSNLine : public CommandOSSXLineBase void OnAdd(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { - if (!this->xlm() || !IRCD->CanSNLine) - { - source.Reply(_("Your IRCd does not support SNLINE.")); + if (!this->xlm()) return; - } unsigned last_param = 2; Anope::string param, expiry; @@ -386,17 +383,17 @@ class CommandOSSNLine : public CommandOSSXLineBase if (Config->GetModule("operserv")->Get<bool>("killonsnline", "yes")) { - this->xlm()->Send(source.GetUser(), x); - Anope::string rreason = "G-Lined: " + reason; for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { User *user = it->second; - if (!user->HasMode("OPER") && user->server != Me && Anope::Match(user->realname, x->mask, false, true)) + if (!user->HasMode("OPER") && user->server != Me && this->xlm()->Check(user, x)) user->Kill(Me->GetName(), rreason); } + + this->xlm()->Send(source.GetUser(), x); } source.Reply(_("\002%s\002 added to the %s list."), mask.c_str(), source.command.c_str()); @@ -477,11 +474,8 @@ class CommandOSSQLine : public CommandOSSXLineBase void OnAdd(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { - if (!this->xlm() || !IRCD->CanSQLine) - { - source.Reply(_("Your IRCd does not support SQLINE.")); + if (!this->xlm()) return; - } unsigned last_param = 2; Anope::string expiry, mask; @@ -626,7 +620,7 @@ class CommandOSSQLine : public CommandOSSXLineBase { User *user = it->second; - if (!user->HasMode("OPER") && user->server != Me && Anope::Match(user->nick, x->mask, false, true)) + if (!user->HasMode("OPER") && user->server != Me && this->xlm()->Check(user, x)) user->Kill(Me->GetName(), rreason); } } |