From a429907207d5b8b05463c72a9b8c880ba03ad921 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 5 Dec 2010 12:28:07 +0000 Subject: rename -del --- irc_im.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'irc_im.c') diff --git a/irc_im.c b/irc_im.c index 40264b49..b0cd3bdf 100644 --- a/irc_im.c +++ b/irc_im.c @@ -362,6 +362,24 @@ static gboolean bee_irc_user_nick_update( irc_user_t *iu ) return TRUE; } +void bee_irc_user_nick_reset( irc_user_t *iu ) +{ + bee_user_t *bu = iu->bu; + bee_user_flags_t online; + + if( bu == FALSE ) + return; + + /* In this case, pretend the user is offline. */ + if( ( online = bu->flags & BEE_USER_ONLINE ) ) + bu->flags &= ~BEE_USER_ONLINE; + + nick_del( bu ); + bee_irc_user_nick_update( iu ); + + bu->flags |= online; +} + /* IRC->IM calls */ static gboolean bee_irc_user_privmsg_cb( gpointer data, gint fd, b_input_condition cond ); -- cgit v1.2.3