Ver código fonte

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 anos atrás
pai
commit
53af2ca1e1
1 arquivos alterados com 2 adições e 0 exclusões
  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);