]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_gline.cpp
I'll give you ##TOAST, :p
[user/henk/code/inspircd.git] / src / cmd_gline.cpp
index c2921d64d961478449bae5baba0556254049d2a2..85fe137b4000933e8448dd8a9d3c9d2a1228d41c 100644 (file)
 #include "xline.h"
 #include "commands/cmd_gline.h"
 
-void cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
+
+
+extern "C" command_t* init_command(InspIRCd* Instance)
+{
+       return new cmd_gline(Instance);
+}
+
+CmdResult cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
 {
        if (pcnt >= 3)
        {
                if (ServerInstance->HostMatchesEveryone(parameters[0],user))
-                       return;
+                       return CMD_FAILURE;
 
                if (!strchr(parameters[0],'@'))
                {       
                        user->WriteServ("NOTICE %s :*** G-Line must contain a username, e.g. *@%s",user->nick,parameters[0]);
-                       return;
+                       return CMD_FAILURE;
                }
 
                ServerInstance->XLines->add_gline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]);
@@ -59,4 +66,7 @@ void cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
                        user->WriteServ("NOTICE %s :*** G-Line %s not found in list, try /stats g.",user->nick,parameters[0]);
                }
        }
+
+       return CMD_SUCCESS;
 }
+