diff options
author | dequis <dx@dxzone.com.ar> | 2015-11-23 18:20:34 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-11-23 18:20:34 -0300 |
commit | ad9ac5dccf8d27700850c02946ad3242a45d6fa9 (patch) | |
tree | b3596ac049c06c614644f9e4e592df94bbc6aae0 /root_commands.c | |
parent | 9c8dbc75d416c8867be20ccf3732303163e620ce (diff) |
Show a nicer message when a protocol is disabled in account add
This adds the disabled protocols' prpl structs to a different linked
list, only used for this lookup. They were previously marked as leaking
by valgrind, so, whatever. I can't free them, since some protocols
memdup() it after attempting to register.
I think disabling the protocols from bitlbee.conf is just stupid and
provides no real benefits, but someone will complain if i get rid of it.
So this just improves the error message to make it less confusing when
someone accidentally uncomments that crap.
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/root_commands.c b/root_commands.c index b5d0aef1..e6ed1602 100644 --- a/root_commands.c +++ b/root_commands.c @@ -424,7 +424,11 @@ static void cmd_account(irc_t *irc, char **cmd) prpl = find_protocol(cmd[2]); if (prpl == NULL) { - irc_rootmsg(irc, "Unknown protocol"); + if (is_protocol_disabled(cmd[2])) { + irc_rootmsg(irc, "Protocol disabled in global config"); + } else { + irc_rootmsg(irc, "Unknown protocol"); + } return; } |