X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_restart.cpp;h=80ad4918449610f4dc2951bdc572a2fc351133f2;hb=46ff0bed0047c4cd05828c5f46dce63176e5084b;hp=73bfce298eb51cc7603b07cc3f26a8ee28a5359e;hpb=371daf9928def23164b49b39ced1d3cdeb9225b8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_restart.cpp b/src/cmd_restart.cpp index 73bfce298..80ad49184 100644 --- a/src/cmd_restart.cpp +++ b/src/cmd_restart.cpp @@ -17,7 +17,7 @@ -extern "C" command_t* init_command(InspIRCd* Instance) +extern "C" DllExport command_t* init_command(InspIRCd* Instance) { return new cmd_restart(Instance); } @@ -28,7 +28,16 @@ CmdResult cmd_restart::Handle (const char** parameters, int pcnt, userrec *user) if (!strcmp(parameters[0],ServerInstance->Config->restartpass)) { ServerInstance->WriteOpers("*** RESTART command from %s!%s@%s, restarting server.",user->nick,user->ident,user->host); - ServerInstance->Restart("Server restarting"); + + try + { + ServerInstance->Restart("Server restarting."); + } + catch (CoreException &e) + { + /* We dont actually get here unless theres some fatal and unrecoverable error. */ + exit(0); + } } else {