diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-16 10:18:02 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-16 10:18:02 +0000 |
commit | 449a51de265cb3b4f0f5003e09fbbb030247c972 (patch) | |
tree | 86ce0c9894f8910187fd65c8d43cd366d05ba9fc /root_commands.c | |
parent | 9fca06579d61d6360520db98092bce13d30d39ce (diff) |
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.
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 ++; |