diff options
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/root_commands.c b/root_commands.c index a62d6c19..bc11746f 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1250,7 +1250,10 @@ static void cmd_chat(irc_t *irc, char **cmd) } if (cmd[3][0] == '!') { - if (!acc->prpl->chat_list) { + if (!acc->ic || !(acc->ic->flags & OPT_LOGGED_IN)) { + irc_rootmsg(irc, "Not logged in to account."); + return; + } else if (!acc->prpl->chat_list) { irc_rootmsg(irc, "Listing chatrooms not supported on that account."); return; } @@ -1305,6 +1308,9 @@ static void cmd_chat(irc_t *irc, char **cmd) if (!(acc = account_get(irc->b, cmd[2]))) { irc_rootmsg(irc, "Invalid account"); return; + } else if (!acc->ic || !(acc->ic->flags & OPT_LOGGED_IN)) { + irc_rootmsg(irc, "Not logged in to account."); + return; } else if (!acc->prpl->chat_list) { irc_rootmsg(irc, "Listing chatrooms not supported on that account."); return; |