From 0bd948edfea280cf9f05e21cd5bef4b7fdf3335c Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 3 Jul 2010 22:16:41 +0100 Subject: Show a user going offline as a QUIT, not as one or more PARTs, like in the old-style BitlBee. This so that the IRC client will show the notification in query windows as well. Make it a setting though, for bug #539. --- irc_im.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'irc_im.c') diff --git a/irc_im.c b/irc_im.c index dcba6f8f..caf0e38e 100644 --- a/irc_im.c +++ b/irc_im.c @@ -107,6 +107,14 @@ static gboolean bee_irc_user_status( bee_t *bee, bee_user_t *bu, bee_user_t *old if( g_hash_table_lookup( irc->watches, iu->key ) ) irc_send_num( irc, 601, "%s %s %s %d :%s", iu->nick, iu->user, iu->host, (int) time( NULL ), "logged offline" ); + + /* Send a QUIT since those will also show up in any + query windows the user may have, plus it's only + one QUIT instead of possibly many (in case of + multiple control chans). If there's a channel that + shows offline people, a JOIN will follow. */ + if( set_getbool( &bee->set, "offline_user_quits" ) ) + irc_user_quit( iu, "Leaving..." ); } } -- cgit v1.2.3