From 1bfe43ebfdb3ac31e789dc0d013efa37ed541611 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 23 Dec 2006 14:54:47 +0000 Subject: Add more comments. Catch CoreException in cmd_restart, and if we catch one, just exit(0). Theres very little else we could do. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6070 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_restart.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/cmd_restart.cpp') diff --git a/src/cmd_restart.cpp b/src/cmd_restart.cpp index 73bfce298..106531e79 100644 --- a/src/cmd_restart.cpp +++ b/src/cmd_restart.cpp @@ -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 { -- cgit v1.3.1-10-gc9f91