From f0cb961652cbd639e89dcd88a86f20a2414146c4 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 18 Apr 2007 23:03:43 -0700 Subject: More API changes: buddy list management. imcb_add_buddy() is now a *real* callback, it's only called from inside IM-modules. This makes sure a buddy only gets added to the BitlBee structures if the add was successful. This gets rid of the weirdness described in #55. Unfortunately for now this change breaks A) automatic renaming of ICQ contacts (if there are names stored in the contact list) B) add -tmp. --- root_commands.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index acbf579f..a7582936 100644 --- a/root_commands.c +++ b/root_commands.c @@ -436,11 +436,11 @@ static void cmd_account( irc_t *irc, char **cmd ) static void cmd_add( irc_t *irc, char **cmd ) { account_t *a; - int add_for_real = 1; + int add_on_server = 1; if( g_strcasecmp( cmd[1], "-tmp" ) == 0 ) { - add_for_real = 0; + add_on_server = 0; cmd ++; /* So evil... :-D */ } @@ -475,12 +475,12 @@ static void cmd_add( irc_t *irc, char **cmd ) /* By making this optional, you can talk to people without having to add them to your *real* (server-side) contact list. */ - if( add_for_real ) + if( add_on_server ) a->ic->acc->prpl->add_buddy( a->ic, cmd[2], NULL ); - - add_buddy( a->ic, NULL, cmd[2], cmd[2] ); - irc_usermsg( irc, "User `%s' added to your contact list as `%s'", cmd[2], user_findhandle( a->ic, cmd[2] )->nick ); + /* add_buddy( a->ic, NULL, cmd[2], cmd[2] ); */ + + irc_usermsg( irc, "Adding `%s' to your contact list", cmd[2] ); } static void cmd_info( irc_t *irc, char **cmd ) -- cgit v1.2.3