summaryrefslogtreecommitdiff
path: root/modules/commands/os_sxline.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-01 01:56:57 -0400
committerAdam <Adam@anope.org>2012-10-01 01:56:57 -0400
commit89428a9d1032e3c2a6e397629a32862b3e58d708 (patch)
treed507904b3fa1cc084f0f3e688c839bcdd47f79d7 /modules/commands/os_sxline.cpp
parentb937d6310d9a7c0e2434200306b63d513cb2ae61 (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.cpp21
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> &params) 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> &params) anope_override
{
- if (!this->xlm() || !ircd->sqline)
+ if (!this->xlm() || !ircdproto->CanSQLine)
{
source.Reply(_("Your IRCd does not support SQLINE"));
return;