Changeset ad9ac5d for root_commands.c


Ignore:
Timestamp:
2015-11-23T21:20:34Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
1e2094e, 5b01e1a
Parents:
9c8dbc7
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r9c8dbc7 rad9ac5d  
    425425
    426426                if (prpl == NULL) {
    427                         irc_rootmsg(irc, "Unknown protocol");
     427                        if (is_protocol_disabled(cmd[2])) {
     428                                irc_rootmsg(irc, "Protocol disabled in global config");
     429                        } else {
     430                                irc_rootmsg(irc, "Unknown protocol");
     431                        }
    428432                        return;
    429433                }
Note: See TracChangeset for help on using the changeset viewer.