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

Always replace user pointers

Bryan Drewery пре 10 година
родитељ
комит
bdc2fc4d50
1 измењених фајлова са 2 додато и 6 уклоњено
  1. 2 6
      src/userrec.cc

+ 2 - 6
src/userrec.cc

@@ -204,14 +204,10 @@ void cache_users()
     }
     }
   }
   }
 
 
-  if (conf.bot->u == NULL) {
-    conf.bot->u = get_user_by_handle(userlist, conf.bot->nick);
-  }
+  conf.bot->u = get_user_by_handle(userlist, conf.bot->nick);
 
 
   for (conf_bot *bot = conf.bots; bot; bot = bot->next) {
   for (conf_bot *bot = conf.bots; bot; bot = bot->next) {
-    if (bot->u == NULL) {
-      bot->u = get_user_by_handle(userlist, bot->nick);
-    }
+    bot->u = get_user_by_handle(userlist, bot->nick);
   }
   }
 
 
   for (tand_t* bot = tandbot; bot; bot = bot->next) {
   for (tand_t* bot = tandbot; bot; bot = bot->next) {