Преглед изворни кода

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 година
родитељ
комит
53af2ca1e1
1 измењених фајлова са 2 додато и 0 уклоњено
  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);