Changeset 5b52a48 for root_commands.c
- Timestamp:
- 2006-07-03T21:22:45Z (18 years ago)
- Branches:
- master
- Children:
- 7e3592e
- Parents:
- 911f2eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r911f2eb r5b52a48 466 466 else 467 467 { 468 nick_set( irc, cmd[2], a->gc->acc->prpl, cmd[3] );468 nick_set( a, cmd[2], cmd[3] ); 469 469 } 470 470 } … … 548 548 else if( u->send_handler == buddy_send_handler ) 549 549 { 550 nick_set( irc, u->handle, u->gc->acc->prpl, cmd[2] );550 nick_set( u->gc->acc, u->handle, cmd[2] ); 551 551 } 552 552 … … 569 569 u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL ); 570 570 user_del( irc, cmd[1] ); 571 nick_del( irc, cmd[1]);571 nick_del( u->gc->acc, u->handle ); 572 572 573 573 irc_usermsg( irc, "Buddy `%s' (nick %s) removed from contact list", s, cmd[1] ); … … 879 879 else 880 880 irc_usermsg( irc, "%d, BitlBee: %s", num, q->question ); 881 }882 883 static void cmd_import_buddies( irc_t *irc, char **cmd )884 {885 struct gaim_connection *gc;886 account_t *a;887 nick_t *n;888 889 if( !( a = account_get( irc, cmd[1] ) ) )890 {891 irc_usermsg( irc, "Invalid account" );892 return;893 }894 else if( !( ( gc = a->gc ) && ( a->gc->flags & OPT_LOGGED_IN ) ) )895 {896 irc_usermsg( irc, "That account is not on-line" );897 return;898 }899 900 if( cmd[2] )901 {902 if( g_strcasecmp( cmd[2], "clear" ) == 0 )903 {904 user_t *u;905 906 /* FIXME: Hmmm, this is actually pretty dangerous code... REMOVEME? :-) */907 for( u = irc->users; u; u = u->next )908 if( u->gc == gc )909 {910 u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL );911 user_del( irc, u->nick );912 }913 914 irc_usermsg( irc, "Old buddy list cleared." );915 }916 else917 {918 irc_usermsg( irc, "Invalid argument: %s", cmd[2] );919 return;920 }921 }922 923 for( n = gc->irc->nicks; n; n = n->next )924 {925 if( n->proto == gc->acc->prpl && !user_findhandle( gc, n->handle ) )926 {927 gc->acc->prpl->add_buddy( gc, n->handle );928 add_buddy( gc, NULL, n->handle, NULL );929 }930 }931 932 irc_usermsg( irc, "Sent all add requests. Please wait for a while, the server needs some time to handle all the adds." );933 881 } 934 882 … … 951 899 { "blist", 0, cmd_blist, 0 }, 952 900 { "nick", 1, cmd_nick, 0 }, 953 { "import_buddies", 1, cmd_import_buddies, 0 },954 901 { "qlist", 0, cmd_qlist, 0 }, 955 902 { NULL }
Note: See TracChangeset
for help on using the changeset viewer.