Просмотр исходного кода

Remove unused function conf_getlocalhub

Bryan Drewery 7 лет назад
Родитель
Сommit
c448aabfa6
2 измененных файлов с 0 добавлено и 15 удалено
  1. 0 14
      src/conf.cc
  2. 0 1
      src/conf.h

+ 0 - 14
src/conf.cc

@@ -1137,20 +1137,6 @@ void conf_add_userlist_bots()
 
 }
 
-conf_bot *conf_getlocalhub(conf_bot *bots) {
-  if (!bots)
-    return NULL;
-
-  conf_bot *localhub = bots;
-  if (localhub->disabled)
-    while (localhub && localhub->disabled)
-      localhub = localhub->next;
-
-  if (!localhub) return NULL;
-  return !localhub->disabled ? localhub : NULL;
-}
-
-
 void conf_setmypid(pid_t pid) {
   conf.bot->pid = pid;
   conf_bot *bot = conf.bots;

+ 0 - 1
src/conf.h

@@ -72,7 +72,6 @@ void conf_checkpids(conf_bot *bots, bool all = 1);
 void conf_add_userlist_bots();
 conf_bot *conf_bots_dup(conf_bot *);
 void deluser_removed_bots(conf_bot *, conf_bot *);
-conf_bot *conf_getlocalhub(conf_bot *) __attribute__((pure));
 void conf_setmypid(pid_t);
 void conf_bot_dup(conf_bot *dest, conf_bot *src);
 void conf_update_hubs(struct userrec* list);