Explorar o código

Add some missing user pointer invalidations in clear_usrlist

Bryan Drewery %!s(int64=10) %!d(string=hai) anos
pai
achega
8ebef2567b
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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;