]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_restart.cpp
auto-set +s when +n is set (as +n requires +s) - allow +n to be 'set twice' allowing...
[user/henk/code/inspircd.git] / src / cmd_restart.cpp
index baf5104f9c4ef781b9d7c46e315779a17807890e..5704b3416bd15830ecfc78f08f39532501c82535 100644 (file)
 #include "configreader.h"
 #include "users.h"
 #include "commands.h"
-#include "helperfuncs.h"
+
 #include "commands/cmd_restart.h"
 
-extern InspIRCd* ServerInstance;;
+
 
 void cmd_restart::Handle (const char** parameters, int pcnt, userrec *user)
 {
        char *argv[32];
-       log(DEFAULT,"Restart: %s",user->nick);
+       ServerInstance->Log(DEFAULT,"Restart: %s",user->nick);
        if (!strcmp(parameters[0],ServerInstance->Config->restartpass))
        {
-               WriteOpers("*** RESTART command from %s!%s@%s, restarting server.",user->nick,user->ident,user->host);
+               ServerInstance->WriteOpers("*** RESTART command from %s!%s@%s, restarting server.",user->nick,user->ident,user->host);
 
                argv[0] = ServerInstance->Config->MyExecutable;
                argv[1] = "-wait";
@@ -43,7 +43,7 @@ void cmd_restart::Handle (const char** parameters, int pcnt, userrec *user)
                argv[3] = NULL;
                
                // close ALL file descriptors
-               send_error("Server restarting.");
+               ServerInstance->SendError("Server restarting.");
                sleep(1);
                for (int i = 0; i < MAX_DESCRIPTORS; i++)
                {
@@ -58,6 +58,6 @@ void cmd_restart::Handle (const char** parameters, int pcnt, userrec *user)
        }
        else
        {
-               WriteOpers("*** Failed RESTART Command from %s!%s@%s.",user->nick,user->ident,user->host);
+               ServerInstance->WriteOpers("*** Failed RESTART Command from %s!%s@%s.",user->nick,user->ident,user->host);
        }
 }