Parcourir la source

Add some missing user pointer invalidations in clear_usrlist

Bryan Drewery il y a 10 ans
Parent
commit
8ebef2567b
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  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;