Changes in root_commands.c [5a8afc3:9f03c47]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r5a8afc3 r9f03c47 439 439 440 440 if (prpl == NULL) { 441 char *msg = explain_unknown_protocol(cmd[2]); 442 irc_rootmsg(irc, "Unknown protocol"); 443 irc_rootmsg(irc, msg); 444 g_free(msg); 441 if (is_protocol_disabled(cmd[2])) { 442 irc_rootmsg(irc, "Protocol disabled in global config"); 443 } else { 444 irc_rootmsg(irc, "Unknown protocol"); 445 } 445 446 return; 446 447 } … … 498 499 499 500 for (a = irc->b->accounts; a; a = a->next) { 500 char *con = NULL, *protocol = NULL;501 char *con; 501 502 502 503 if (a->ic && (a->ic->flags & OPT_LOGGED_IN)) { … … 510 511 } 511 512 512 if (a->prpl == &protocol_missing) { 513 protocol = g_strdup_printf("%s (missing!)", set_getstr(&a->set, "_protocol_name")); 514 } else { 515 protocol = g_strdup(a->prpl->name); 516 } 517 518 irc_rootmsg(irc, "%2d (%s): %s, %s%s", i, a->tag, protocol, a->user, con); 519 g_free(protocol); 513 irc_rootmsg(irc, "%2d (%s): %s, %s%s", i, a->tag, a->prpl->name, a->user, con); 520 514 521 515 i++; … … 531 525 532 526 for (a = irc->b->accounts; a; a = a->next) { 533 if (!a->ic && a->auto_connect && a->prpl != &protocol_missing) {527 if (!a->ic && a->auto_connect) { 534 528 if (strcmp(a->pass, PASSWORD_PENDING) == 0) { 535 529 irc_rootmsg(irc, "Enter password for account %s " … … 591 585 irc_rootmsg(irc, "Enter password for account %s " 592 586 "first (use /OPER)", a->tag); 593 } else if (a->prpl == &protocol_missing) {594 char *proto = set_getstr(&a->set, "_protocol_name");595 char *msg = explain_unknown_protocol(proto);596 irc_rootmsg(irc, "Unknown protocol `%s'", proto);597 irc_rootmsg(irc, msg);598 g_free(msg);599 587 } else { 600 588 account_on(irc->b, a);
Note: See TracChangeset
for help on using the changeset viewer.