Explorar o código

* Fixed cmd_restart making bot quit with "Updating..."

svn: 1580
Bryan Drewery %!s(int64=21) %!d(string=hai) anos
pai
achega
91513786f3
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/misc.c

+ 2 - 1
src/misc.c

@@ -618,7 +618,7 @@ void
 restart(int idx)
 {
   char buf[1024] = "";
-  const char *reason = idx != -1 ?  "Updating..." : "Restarting...";
+  const char *reason = updating ? "Updating..." : "Restarting...";
  
 #ifdef HUB
   write_userfile(idx);
@@ -741,6 +741,7 @@ int updatebin(int idx, char *par, int secs)
     
     /* this odd statement makes it so specifying 1 sec will restart other bots running
      * and then just restart with no delay */
+    updating = 1;
     if (secs > 1) {
       egg_timeval_t howlong;
       howlong.sec = secs;