Przeglądaj źródła

Stop sharing with the bot when it is disconnected.

This fixes the following warning on the devel branch when LASTON is
attempted to share to the disconnected bot.

  [07:04:00] !!! writing to nonexistent socket: 14
  [07:04:00] !-> 's c LASTON botnick unlinked 1455347040
Bryan Drewery 10 lat temu
rodzic
commit
53af2ca1e1
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/dcc.cc

+ 2 - 0
src/dcc.cc

@@ -461,6 +461,8 @@ free_dcc_bot_(int n, void *x)
 {
   if (dcc[n].type == &DCC_BOT) {
     unvia(n, findbot(dcc[n].nick));
+    /* Stop sharing with this bot in case rembot->laston is shared out. */
+    dcc[n].status &= ~STAT_SHARE;
     rembot(dcc[n].nick);
   }
   free(x);