diff options
author | Adam <Adam@anope.org> | 2012-10-01 01:56:57 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-01 01:56:57 -0400 |
commit | 89428a9d1032e3c2a6e397629a32862b3e58d708 (patch) | |
tree | d507904b3fa1cc084f0f3e688c839bcdd47f79d7 /modules/commands/os_sxline.cpp | |
parent | b937d6310d9a7c0e2434200306b63d513cb2ae61 (diff) |
Cleanup of all of the protocol modules, rewrote message handling system to be a bit more C++ ish
Diffstat (limited to 'modules/commands/os_sxline.cpp')
-rw-r--r-- | modules/commands/os_sxline.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp index 20e76a94d..8cd3d9f7a 100644 --- a/modules/commands/os_sxline.cpp +++ b/modules/commands/os_sxline.cpp @@ -250,7 +250,7 @@ class CommandOSSNLine : public CommandOSSXLineBase void OnAdd(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { - if (!this->xlm() ||! ircd->snline) + if (!this->xlm() || !ircdproto->CanSNLine) { source.Reply(_("Your IRCd does not support SNLINE")); return; @@ -384,18 +384,15 @@ class CommandOSSNLine : public CommandOSSXLineBase { this->xlm()->Send(source.GetUser(), x); - if (!ircd->sglineenforce) - { - Anope::string rreason = "G-Lined: " + reason; + Anope::string rreason = "G-Lined: " + reason; - for (Anope::insensitive_map<User *>::const_iterator it = UserListByNick.begin(); it != UserListByNick.end();) - { - User *user = it->second; - ++it; + for (Anope::insensitive_map<User *>::const_iterator it = UserListByNick.begin(); it != UserListByNick.end();) + { + User *user = it->second; + ++it; - if (!user->HasMode(UMODE_OPER) && user->server != Me && Anope::Match(user->realname, x->Mask, false, true)) - user->Kill(Config->ServerName, rreason); - } + if (!user->HasMode(UMODE_OPER) && user->server != Me && Anope::Match(user->realname, x->Mask, false, true)) + user->Kill(Config->ServerName, rreason); } } @@ -474,7 +471,7 @@ class CommandOSSQLine : public CommandOSSXLineBase void OnAdd(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { - if (!this->xlm() || !ircd->sqline) + if (!this->xlm() || !ircdproto->CanSQLine) { source.Reply(_("Your IRCd does not support SQLINE")); return; |