Changes in root_commands.c [9f03c47:5a8afc3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r9f03c47 r5a8afc3 439 439 440 440 if (prpl == NULL) { 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 } 441 char *msg = explain_unknown_protocol(cmd[2]); 442 irc_rootmsg(irc, "Unknown protocol"); 443 irc_rootmsg(irc, msg); 444 g_free(msg); 446 445 return; 447 446 } … … 499 498 500 499 for (a = irc->b->accounts; a; a = a->next) { 501 char *con ;500 char *con = NULL, *protocol = NULL; 502 501 503 502 if (a->ic && (a->ic->flags & OPT_LOGGED_IN)) { … … 511 510 } 512 511 513 irc_rootmsg(irc, "%2d (%s): %s, %s%s", i, a->tag, a->prpl->name, a->user, con); 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); 514 520 515 521 i++; … … 525 531 526 532 for (a = irc->b->accounts; a; a = a->next) { 527 if (!a->ic && a->auto_connect ) {533 if (!a->ic && a->auto_connect && a->prpl != &protocol_missing) { 528 534 if (strcmp(a->pass, PASSWORD_PENDING) == 0) { 529 535 irc_rootmsg(irc, "Enter password for account %s " … … 585 591 irc_rootmsg(irc, "Enter password for account %s " 586 592 "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); 587 599 } else { 588 600 account_on(irc->b, a);
Note: See TracChangeset
for help on using the changeset viewer.