]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_antibear.cpp
Next part of Development/Hooking (see wiki)
[user/henk/code/inspircd.git] / src / modules / m_antibear.cpp
index 5690572ce7d0de53a1d340d5a32eba8cf84b9f79..aecf143ece69695b869ebfc6624a64f3998b129b 100644 (file)
@@ -46,12 +46,16 @@ class ModuleAntiBear : public Module
                {
                        if (!strncmp(parameters[1], "\1TIME Mon May 01 18:54:20 2006", 30))
                        {
-                               if (ServerInstance->XLines->add_zline(86400, ServerInstance->Config->ServerName, "Unless you're stuck in a time warp, you appear to be a bear bot!", user->MakeHostIP()))
+                               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,NULL))
                                {
-                                       ServerInstance->XLines->apply_lines(APPLY_ZLINES);
-                                       FOREACH_MOD(I_OnAddGLine,OnAddZLine(86400, NULL, "Unless you're stuck in a time warp, you appear to be a bear bot!", user->MakeHostIP()));
-                                       return 1;
+                                       ServerInstance->XLines->ApplyLines();
                                }
+                               else
+                                       delete zl;
+
+                               return 1;
                        }
                        
                        user->Shrink("antibear_timewait");