ソースを参照

* When a user is removed and is on partyline, they are now booted. (#142)

svn: 2336
Bryan Drewery 21 年 前
コミット
1eb433f5de
2 ファイル変更8 行追加3 行削除
  1. 1 0
      doc/UPDATES
  2. 7 3
      src/userrec.c

+ 1 - 0
doc/UPDATES

@@ -13,6 +13,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 
 1.2.7
 * Forgot 'log_bad = 0;' to fix the '!' showing up for aliases.
+* When a user is removed and is on partyline, they are now booted. (#142)
 
 1.2.6
 * (REVERTED FROM 1.2.3) Disabled all memory allocations after a segfault (Fixes CPU spinning)

+ 7 - 3
src/userrec.c

@@ -639,9 +639,13 @@ int deluser(char *handle)
     prev->next = u->next;
   if (!noshare && (handle[0] != '*'))
     shareout("k %s\n", handle);
-  for (fnd = 0; fnd < dcc_total; fnd++)
-    if (dcc[fnd].type && dcc[fnd].user == u)
-      dcc[fnd].user = NULL;	/* Clear any dcc users for this entry null is safe-ish */
+  for (fnd = 0; fnd < dcc_total; fnd++) {
+    if (dcc[fnd].type && dcc[fnd].user == u) {
+      dprintf(fnd, "-+- POOF! -+-\n");
+      dprintf(fnd, "You are no longer a user on this botnet.\n");
+      do_boot(fnd, conf.bot->nick, "User removed.");
+    }
+  }
   clear_chanlist();
   freeuser(u);
   lastuser = NULL;