summaryrefslogtreecommitdiff
path: root/src/irc/bot/botnet-connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/bot/botnet-connection.c')
-rw-r--r--src/irc/bot/botnet-connection.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/irc/bot/botnet-connection.c b/src/irc/bot/botnet-connection.c
index 6a057758..68c33d0a 100644
--- a/src/irc/bot/botnet-connection.c
+++ b/src/irc/bot/botnet-connection.c
@@ -248,6 +248,11 @@ void botnet_connect(BOTNET_REC *botnet)
botnet_listen(botnet);
}
+ if (botnet->uplinks == NULL) {
+ /* we have no uplinks */
+ return;
+ }
+
/* find some bot where we can try to connect to */
now = time(NULL);
uplink = best = NULL;
@@ -270,6 +275,7 @@ void botnet_connect(BOTNET_REC *botnet)
if (best == NULL) {
/* reconnect later */
botnet->reconnect = TRUE;
+ return;
}
/* connect to uplink */
@@ -369,6 +375,8 @@ static void botnet_event(BOT_REC *bot, const char *data)
if (bot->connected)
return;
+ signal_stop_by_name("botnet event");
+
if (bot->uplink) {
botnet_connect_event_uplink(bot, data);
return;