diff options
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/root_commands.c b/root_commands.c index 48400cdd..8e410340 100644 --- a/root_commands.c +++ b/root_commands.c @@ -449,7 +449,7 @@ static void cmd_account(irc_t *irc, char **cmd) if (prpl == NULL) { char *msg = explain_unknown_protocol(cmd[2]); irc_rootmsg(irc, "Unknown protocol"); - irc_rootmsg(irc, msg); + irc_rootmsg(irc, "%s", msg); g_free(msg); return; } @@ -603,7 +603,7 @@ static void cmd_account(irc_t *irc, char **cmd) char *proto = set_getstr(&a->set, "_protocol_name"); char *msg = explain_unknown_protocol(proto); irc_rootmsg(irc, "Unknown protocol `%s'", proto); - irc_rootmsg(irc, msg); + irc_rootmsg(irc, "%s", msg); g_free(msg); } else { account_on(irc->b, a); @@ -1085,7 +1085,7 @@ static void cmd_blist(irc_t *irc, char **cmd) } if (error) { - irc_rootmsg(irc, error->message); + irc_rootmsg(irc, "%s", error->message); g_error_free(error); } @@ -1279,7 +1279,7 @@ static void cmd_plugins(irc_t *irc, char **cmd) } #endif - irc_rootmsg(irc, ""); + irc_rootmsg(irc, " "); gstr = g_string_new(NULL); prpls = get_protocols(); @@ -1385,13 +1385,19 @@ static void cmd_chat(irc_t *irc, char **cmd) set_setstr(&ic->set, "chat_type", "room") && set_setstr(&ic->set, "account", cmd[2]) && set_setstr(&ic->set, "room", room)) { - irc_rootmsg(irc, "Chatroom successfully added."); + irc_rootmsg(irc, "Chatroom successfully added, join with \002/join %s\002", channel); } else { if (ic) { irc_channel_free(ic); - } - irc_rootmsg(irc, "Could not add chatroom."); + irc_rootmsg(irc, "Error adding chatroom."); + } else if (irc_channel_by_name(irc, channel)) { + irc_rootmsg(irc, "A channel named `%s' already exists. " + "Join with \002/join %s\002 or see \002help channel\002 to modify it", + channel, channel); + } else { + irc_rootmsg(irc, "Error creating channel for chatroom."); + } } g_free(channel); } else if (g_strcasecmp(cmd[1], "list") == 0) { |