aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-07-26 08:44:18 +0200
committerMarius Halden <marius.h@lden.org>2016-07-26 08:44:18 +0200
commit2e2b21996d42f1956db372df6e2bd25a0b089ceb (patch)
tree758f9148f5b5d84da7f4a3a27b84efb4d2b250f1
parent5b620f5bb41ac322770e2c75c6a8155abe61780f (diff)
Chatlist complain not logged in
-rw-r--r--root_commands.c8
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;