Changeset f1d488e
- Timestamp:
- 2010-07-18T15:04:19Z (14 years ago)
- Branches:
- master
- Children:
- 2efb69b
- Parents:
- 2bfe976
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r2bfe976 rf1d488e 624 624 625 625 if( add_on_server ) 626 a->prpl->add_buddy( a->ic, cmd[2], NULL ); 627 else 626 { 627 irc_channel_t *ic; 628 char *s, *group = NULL;; 629 630 if( ( ic = irc_channel_by_name( irc, irc->last_root_cmd ) ) && 631 ( s = set_getstr( &ic->set, "fill_by" ) ) && 632 strcmp( s, "group" ) == 0 && 633 ( group = set_getstr( &ic->set, "group" ) ) ) 634 irc_usermsg( irc, "Adding `%s' to contact list (group %s)", 635 cmd[2], group ); 636 else 637 irc_usermsg( irc, "Adding `%s' to contact list", cmd[2] ); 638 639 a->prpl->add_buddy( a->ic, cmd[2], group ); 640 } 641 else 642 { 643 bee_user_t *bu; 644 irc_user_t *iu; 645 628 646 /* Only for add -tmp. For regular adds, this callback will 629 647 be called once the IM server confirms. */ 630 bee_user_new( irc->b, a->ic, cmd[2], BEE_USER_LOCAL ); 631 632 irc_usermsg( irc, "Adding `%s' to your contact list", cmd[2] ); 648 if( ( bu = bee_user_new( irc->b, a->ic, cmd[2], BEE_USER_LOCAL ) ) && 649 ( iu = bu->ui_data ) ) 650 irc_usermsg( irc, "Temporarily assigned nickname `%s' " 651 "to contact `%s'", iu->nick, cmd[2] ); 652 } 653 633 654 } 634 655 … … 810 831 imc_rem_allow( ic, cmd[2] ); 811 832 imc_add_block( ic, cmd[2] ); 812 irc_usermsg( irc, "Buddy `%s' moved from your allow- to yourblock-list", cmd[2] );833 irc_usermsg( irc, "Buddy `%s' moved from allow- to block-list", cmd[2] ); 813 834 } 814 835 } … … 871 892 imc_add_allow( ic, cmd[2] ); 872 893 873 irc_usermsg( irc, "Buddy `%s' moved from your block- to yourallow-list", cmd[2] );894 irc_usermsg( irc, "Buddy `%s' moved from block- to allow-list", cmd[2] ); 874 895 } 875 896 } … … 1110 1131 { 1111 1132 irc_usermsg( irc, "Unknown command: %s %s. Please use \x02help commands\x02 to get a list of available commands.", "chat", cmd[1] ); 1133 } 1134 } 1135 1136 static void cmd_group( irc_t *irc, char **cmd ) 1137 { 1138 GSList *l; 1139 int len; 1140 1141 len = strlen( cmd[1] ); 1142 if( g_strncasecmp( cmd[1], "list", len ) == 0 ) 1143 { 1144 int n = 0; 1145 1146 if( strchr( irc->umode, 'b' ) ) 1147 irc_usermsg( irc, "Group list:" ); 1148 1149 for( l = irc->b->groups; l; l = l->next ) 1150 { 1151 bee_group_t *bg = l->data; 1152 irc_usermsg( irc, "%d. %s", n ++, bg->name ); 1153 } 1154 irc_usermsg( irc, "End of group list" ); 1155 } 1156 else 1157 { 1158 irc_usermsg( irc, "Unknown command: %s %s. Please use \x02help commands\x02 to get a list of available commands.", "group", cmd[1] ); 1112 1159 } 1113 1160 } … … 1186 1233 { "drop", 1, cmd_drop, 0 }, 1187 1234 { "ft", 0, cmd_transfer, 0 }, 1235 { "group", 1, cmd_group, 0 }, 1188 1236 { "help", 0, cmd_help, 0 }, 1189 1237 { "identify", 1, cmd_identify, 0 },
Note: See TracChangeset
for help on using the changeset viewer.