Changes in root_commands.c [b441614:ad9ac5d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
rb441614 rad9ac5d 163 163 irc_umode_set(irc, "+R", 1); 164 164 165 if (irc->caps & CAP_SASL) { 166 irc_user_t *iu = irc->user; 167 irc_send_num(irc, 900, "%s!%s@%s %s :You are now logged in as %s", 168 iu->nick, iu->user, iu->host, iu->nick, iu->nick); 169 } 170 165 171 bitlbee_whatsnew(irc); 166 172 … … 238 244 irc->status |= USTATUS_IDENTIFIED; 239 245 irc_umode_set(irc, "+R", 1); 246 247 if (irc->caps & CAP_SASL) { 248 irc_user_t *iu = irc->user; 249 irc_send_num(irc, 900, "%s!%s@%s %s :You are now logged in as %s", 250 iu->nick, iu->user, iu->host, iu->nick, iu->nick); 251 } 240 252 241 253 /* Set this var now, or anyone who logs in to his/her … … 413 425 414 426 if (prpl == NULL) { 415 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 } 416 432 return; 417 433 } … … 460 476 461 477 for (a = irc->b->accounts; a; a = a->next) { 462 char *con = NULL, *protocol = NULL;478 char *con; 463 479 464 480 if (a->ic && (a->ic->flags & OPT_LOGGED_IN)) { … … 471 487 con = ""; 472 488 } 473 if (a->prpl == &protocol_missing) { 474 protocol = g_strdup_printf("%s (missing!)", set_getstr(&a->set, "_protocol_name")); 475 } else { 476 protocol = g_strdup(a->prpl->name); 477 } 478 479 irc_rootmsg(irc, "%2d (%s): %s, %s%s", i, a->tag, protocol, a->user, con); 480 g_free(protocol); 489 490 irc_rootmsg(irc, "%2d (%s): %s, %s%s", i, a->tag, a->prpl->name, a->user, con); 481 491 482 492 i++; … … 492 502 493 503 for (a = irc->b->accounts; a; a = a->next) { 494 if (!a->ic && a->auto_connect && a->prpl != &protocol_missing) {504 if (!a->ic && a->auto_connect) { 495 505 if (strcmp(a->pass, PASSWORD_PENDING) == 0) { 496 506 irc_rootmsg(irc, "Enter password for account %s " … … 549 559 irc_rootmsg(irc, "Enter password for account %s " 550 560 "first (use /OPER)", a->tag); 551 } else if (a->prpl == &protocol_missing) {552 irc_rootmsg(irc, "Protocol `%s' not recognised (plugin may be missing or not running?)",553 set_getstr(&a->set, "_protocol_name"));554 561 } else { 555 562 account_on(irc->b, a); … … 656 663 irc_rootmsg(irc, "That account is not on-line"); 657 664 return; 658 } else if (add_on_server && !a->prpl->add_buddy) { 659 irc_rootmsg(irc, "IM protocol does not support contact list modification"); 660 return; 665 } 666 667 if (cmd[3]) { 668 if (!nick_ok(irc, cmd[3])) { 669 irc_rootmsg(irc, "The requested nick `%s' is invalid", cmd[3]); 670 return; 671 } else if (irc_user_by_name(irc, cmd[3])) { 672 irc_rootmsg(irc, "The requested nick `%s' already exists", cmd[3]); 673 return; 674 } else { 675 nick_set_raw(a, cmd[2], cmd[3]); 676 } 661 677 } 662 678 … … 674 690 } 675 691 676 if (cmd[3]) {677 if (!nick_ok(irc, cmd[3])) {678 irc_rootmsg(irc, "The requested nick `%s' is invalid", cmd[3]);679 return;680 } else if (irc_user_by_name(irc, cmd[3])) {681 irc_rootmsg(irc, "The requested nick `%s' already exists", cmd[3]);682 return;683 } else {684 nick_set_raw(a, cmd[2], cmd[3]);685 }686 }687 688 692 if (add_on_server) { 689 693 irc_channel_t *ic; … … 729 733 s = g_strdup(bu->handle); 730 734 731 if (bu->ic->acc->prpl->remove_buddy) { 732 bu->ic->acc->prpl->remove_buddy(bu->ic, bu->handle, NULL); 733 } else { 734 irc_rootmsg(irc, "IM protocol does not support contact list modification, " 735 "removal will likely not be permanent"); 736 } 737 735 bu->ic->acc->prpl->remove_buddy(bu->ic, bu->handle, NULL); 738 736 nick_del(bu); 739 737 if (g_slist_find(irc->users, iu)) {
Note: See TracChangeset
for help on using the changeset viewer.