From 449a51de265cb3b4f0f5003e09fbbb030247c972 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 16 Mar 2010 10:18:02 +0000 Subject: Include non-away status messages in blist and whois responses. The whois change is a complete violation of the IRC protocol but that doesn't seem to be an uncommon thing. --- root_commands.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index b3432b9b..15e6e72a 100644 --- a/root_commands.c +++ b/root_commands.c @@ -913,7 +913,7 @@ static void cmd_blist( irc_t *irc, char **cmd ) else if( cmd[1] && g_strcasecmp( cmd[1], "online" ) == 0 ) online = 1; else - online = away = 1; + online = away = 1; if( strchr( irc->umode, 'b' ) != NULL ) format = "%s\t%s\t%s"; @@ -926,8 +926,13 @@ static void cmd_blist( irc_t *irc, char **cmd ) { if( online == 1 ) { + char st[256] = "Online"; + + if( u->status_msg ) + g_snprintf( st, sizeof( st ) - 1, "Online (%s)", u->status_msg ); + g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); - irc_usermsg( irc, format, u->nick, s, "Online" ); + irc_usermsg( irc, format, u->nick, s, st ); } n_online ++; -- cgit v1.2.3