瀏覽代碼

Add some missing user pointer invalidations in clear_usrlist

Bryan Drewery 10 年之前
父節點
當前提交
8ebef2567b
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/userrec.cc

+ 7 - 0
src/userrec.cc

@@ -189,6 +189,13 @@ void clear_userlist(struct userrec *bu)
 
     conf.bot->u = NULL;
 
+    for (tand_t* bot = tandbot; bot; bot = bot->next)
+      bot->u = NULL;
+
+    if (!conf.bot->hub) {
+      Auth::NullUsers();
+    }
+
     clear_chanlist();
     lastuser = NULL;