|
|
@@ -521,6 +521,11 @@ void add_myself_to_userlist() {
|
|
|
userlist = adduser(userlist, conf.bot->nick, "none", "-", USER_OP, 1);
|
|
|
conf.bot->u = get_user_by_handle(userlist, conf.bot->nick);
|
|
|
bi = (struct bot_addr *) my_calloc(1, sizeof(struct bot_addr));
|
|
|
+ } else {
|
|
|
+ bi = (struct bot_addr *) get_user(&USERENTRY_BOTADDR, conf.bot->u);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!bi) {
|
|
|
if (conf.bot->net.ip)
|
|
|
bi->address = strdup(conf.bot->net.ip);
|
|
|
bi->telnet_port = bi->relay_port = 3333;
|
|
|
@@ -530,12 +535,7 @@ void add_myself_to_userlist() {
|
|
|
bi->hublevel = 999;
|
|
|
bi->uplink = (char *) my_calloc(1, 1);
|
|
|
set_user(&USERENTRY_BOTADDR, conf.bot->u, bi);
|
|
|
- } else {
|
|
|
- bi = (struct bot_addr *) get_user(&USERENTRY_BOTADDR, conf.bot->u);
|
|
|
}
|
|
|
-
|
|
|
- if (!bi)
|
|
|
- fatal("I'm added to userlist but without a bot record!", 0);
|
|
|
}
|
|
|
|
|
|
void chanprog()
|