aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-07-17 15:23:20 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-07-17 15:23:20 +0100
commit5e98ff07af5a8d89b7c813f55dfd0972fca11297 (patch)
tree82b0d72d523940d551422ba79e6aeed9af677e81 /root_commands.c
parent6ef19f7260711d9d28359492f196b0af4825882d (diff)
Free a user structure when using the remove command. This disappeared while
most IM modules don't call back when a removal was successful.
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/root_commands.c b/root_commands.c
index f4bb4b82..e9b0e0ab 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -643,7 +643,8 @@ static void cmd_remove( irc_t *irc, char **cmd )
bu->ic->acc->prpl->remove_buddy( bu->ic, bu->handle, NULL );
nick_del( bu );
- //TODO(wilmer): bee_user_free() and/or let the IM mod do it? irc_user_free( irc, cmd[1] );
+ if( g_slist_find( irc->users, iu ) )
+ bee_user_free( irc->b, bu );
irc_usermsg( irc, "Buddy `%s' (nick %s) removed from contact list", s, cmd[1] );
g_free( s );