Explorar el Código

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 hace 10 años
padre
commit
53af2ca1e1
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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);