Просмотр исходного кода

* Initialize irc module when disconnecting from server if in the middle of a restart

Bryan Drewery 16 лет назад
Родитель
Сommit
a89ab24a6e
2 измененных файлов с 5 добавлено и 0 удалено
  1. 2 0
      doc/UPDATES
  2. 3 0
      src/mod/server.mod/servmsg.c

+ 2 - 0
doc/UPDATES

@@ -1,3 +1,5 @@
+* Fix bot going zombie if it jumps during a restart
+
 1.3 - http://wraith.botpack.net/milestone/1.3
 * Binary / shell / startup changes
   * Binary error messages are no longer obscure numbers or fake segfaults. (Compile with OBSCURE_ERRORS to re-enable)

+ 3 - 0
src/mod/server.mod/servmsg.c

@@ -1256,6 +1256,7 @@ static int gotmode(char *from, char *msg)
 }
 
 static void end_burstmode();
+void irc_init();
 
 static void disconnect_server(int idx, int dolost)
 {
@@ -1291,6 +1292,8 @@ static void disconnect_server(int idx, int dolost)
     lostdcc(idx);
   }
   end_burstmode();
+  if (reset_chans == 2)
+    irc_init();
   reset_chans = 0;
   keepnick = 1;
   /* Invalidate the cmd_swhois cache callback data */