diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/cmd_eline.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_gline.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_kline.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_qline.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_zline.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_antibear.cpp | 15 |
6 files changed, 16 insertions, 9 deletions
diff --git a/src/commands/cmd_eline.cpp b/src/commands/cmd_eline.cpp index 176eef99d..b32c2af91 100644 --- a/src/commands/cmd_eline.cpp +++ b/src/commands/cmd_eline.cpp @@ -39,7 +39,7 @@ CmdResult CommandEline::Handle (const char** parameters, int pcnt, User *user) long duration = ServerInstance->Duration(parameters[1]); ELine* el = new ELine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ih.first.c_str(), ih.second.c_str()); - if (!ServerInstance->XLines->AddLine(el)) + if (ServerInstance->XLines->AddLine(el)) { FOREACH_MOD(I_OnAddELine,OnAddELine(duration, user, parameters[2], parameters[0])); diff --git a/src/commands/cmd_gline.cpp b/src/commands/cmd_gline.cpp index 6a8c8f807..4dde5298c 100644 --- a/src/commands/cmd_gline.cpp +++ b/src/commands/cmd_gline.cpp @@ -43,7 +43,7 @@ CmdResult CommandGline::Handle (const char** parameters, int pcnt, User *user) long duration = ServerInstance->Duration(parameters[1]); GLine* gl = new GLine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ih.first.c_str(), ih.second.c_str()); - if (!ServerInstance->XLines->AddLine(gl)) + if (ServerInstance->XLines->AddLine(gl)) { FOREACH_MOD(I_OnAddGLine,OnAddGLine(duration, user, parameters[2], parameters[0])); diff --git a/src/commands/cmd_kline.cpp b/src/commands/cmd_kline.cpp index 324c92c13..e15604711 100644 --- a/src/commands/cmd_kline.cpp +++ b/src/commands/cmd_kline.cpp @@ -43,7 +43,7 @@ CmdResult CommandKline::Handle (const char** parameters, int pcnt, User *user) long duration = ServerInstance->Duration(parameters[1]); KLine* kl = new KLine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ih.first.c_str(), ih.second.c_str()); - if (!ServerInstance->XLines->AddLine(kl)) + if (ServerInstance->XLines->AddLine(kl)) { FOREACH_MOD(I_OnAddKLine,OnAddKLine(duration, user, parameters[2], parameters[0])); diff --git a/src/commands/cmd_qline.cpp b/src/commands/cmd_qline.cpp index 8384c2ca0..7ccfe6031 100644 --- a/src/commands/cmd_qline.cpp +++ b/src/commands/cmd_qline.cpp @@ -37,7 +37,7 @@ CmdResult CommandQline::Handle (const char** parameters, int pcnt, User *user) long duration = ServerInstance->Duration(parameters[1]); QLine* ql = new QLine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], parameters[0]); - if (!ServerInstance->XLines->AddLine(ql)) + if (ServerInstance->XLines->AddLine(ql)) { FOREACH_MOD(I_OnAddQLine,OnAddQLine(duration, user, parameters[2], parameters[0])); if (!duration) diff --git a/src/commands/cmd_zline.cpp b/src/commands/cmd_zline.cpp index 971961c57..9c1b3dfd0 100644 --- a/src/commands/cmd_zline.cpp +++ b/src/commands/cmd_zline.cpp @@ -45,7 +45,7 @@ CmdResult CommandZline::Handle (const char** parameters, int pcnt, User *user) ipaddr++; } ZLine* zl = new ZLine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ipaddr); - if (!ServerInstance->XLines->AddLine(zl)) + if (ServerInstance->XLines->AddLine(zl)) { FOREACH_MOD(I_OnAddZLine,OnAddZLine(duration, user, parameters[2], parameters[0])); if (!duration) diff --git a/src/modules/m_antibear.cpp b/src/modules/m_antibear.cpp index f18aa6883..0c65adab3 100644 --- a/src/modules/m_antibear.cpp +++ b/src/modules/m_antibear.cpp @@ -46,10 +46,17 @@ class ModuleAntiBear : public Module { if (!strncmp(parameters[1], "\1TIME Mon May 01 18:54:20 2006", 30)) { - ServerInstance->XLines->AddZLine(86400, ServerInstance->Config->ServerName, "Unless you're stuck in a time warp, you appear to be a bear bot!", user->GetIPString()); - // XXX move events into the damn XLineManager stuff - FOREACH_MOD(I_OnAddGLine,OnAddZLine(86400, NULL, "Unless you're stuck in a time warp, you appear to be a bear bot!", user->MakeHostIP())); - ServerInstance->XLines->ApplyLines(); + ZLine* zl = new ZLine(ServerInstance, ServerInstance->Time(), 86400, ServerInstance->Config->ServerName, + "Unless you're stuck in a time warp, you appear to be a bear bot!", user->GetIPString()); + if (ServerInstance->XLines->AddLine(zl)) + { + // XXX move events into the xline manager + FOREACH_MOD(I_OnAddGLine,OnAddZLine(86400, NULL, "Unless you're stuck in a time warp, you appear to be a bear bot!", user->MakeHostIP())); + ServerInstance->XLines->ApplyLines(); + } + else + delete zl; + return 1; } |