]> jfr.im git - solanum.git/blobdiff - ircd/restart.c
make more snotes L_NETWIDE
[solanum.git] / ircd / restart.c
index 5bf39f564938a685827ed7e3edaa5e37d2a250cb..acd5f7db738cf1f4a8b0b0cf10764b19cca60602 100644 (file)
@@ -20,8 +20,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
  *  USA
- *
- *  $Id: restart.c 24244 2007-08-22 19:04:55Z androsyn $
  */
 
 #include "stdinc.h"
 #include "ircd_signal.h"
 
 /* external var */
-extern char **myargv;
+extern char * const *myargv;
 
 void
 restart(const char *mesg)
 {
-       static int was_here = NO;       /* redundant due to restarting flag below */
+       static bool was_here = false;   /* redundant due to restarting flag below */
 
        if(was_here)
                abort();
-       was_here = YES;
+       was_here = true;
 
        ilog(L_MAIN, "Restarting Server because: %s", mesg);
 
@@ -56,7 +54,7 @@ server_reboot(void)
        int i;
        char path[PATH_MAX+1];
 
-       sendto_realops_snomask(SNO_GENERAL, L_ALL, "Restarting server...");
+       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Restarting server...");
 
        ilog(L_MAIN, "Restarting server...");
 
@@ -74,10 +72,10 @@ server_reboot(void)
                close(i);
 
        unlink(pidFileName);
-       execv(SPATH, (void *)myargv);
+       execv(ircd_paths[IRCD_PATH_IRCD_EXEC], (void *)myargv);
 
        /* use this if execv of SPATH fails */
-       rb_snprintf(path, sizeof(path), "%s/bin/ircd", ConfigFileEntry.dpath);
+       snprintf(path, sizeof(path), "%s%cbin%circd", ConfigFileEntry.dpath, RB_PATH_SEPARATOR, RB_PATH_SEPARATOR);
 
        execv(path, (void *)myargv);
        exit(-1);