Changeset 5a8afc3 for root_commands.c
- Timestamp:
- 2016-11-21T06:58:47Z (8 years ago)
- Branches:
- master
- Children:
- 3f44e43, f8c9347
- Parents:
- 11d4123
- git-author:
- dequis <dx@…> (21-11-16 06:40:54)
- git-committer:
- dequis <dx@…> (21-11-16 06:58:47)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r11d4123 r5a8afc3 498 498 499 499 for (a = irc->b->accounts; a; a = a->next) { 500 char *con ;500 char *con = NULL, *protocol = NULL; 501 501 502 502 if (a->ic && (a->ic->flags & OPT_LOGGED_IN)) { … … 510 510 } 511 511 512 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); 513 520 514 521 i++; … … 524 531 525 532 for (a = irc->b->accounts; a; a = a->next) { 526 if (!a->ic && a->auto_connect ) {533 if (!a->ic && a->auto_connect && a->prpl != &protocol_missing) { 527 534 if (strcmp(a->pass, PASSWORD_PENDING) == 0) { 528 535 irc_rootmsg(irc, "Enter password for account %s " … … 584 591 irc_rootmsg(irc, "Enter password for account %s " 585 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); 586 599 } else { 587 600 account_on(irc->b, a);
Note: See TracChangeset
for help on using the changeset viewer.