From eb504957c2ffa1a3130951d5381672fb3ef9dfd9 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 4 May 2010 09:45:10 +0100 Subject: Show offline/away status better in /WHO and /WHOIS. --- irc_send.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'irc_send.c') diff --git a/irc_send.c b/irc_send.c index d3485221..b3283152 100644 --- a/irc_send.c +++ b/irc_send.c @@ -230,6 +230,10 @@ void irc_send_whois( irc_user_t *iu ) else irc_send_num( irc, num, "%s :%s", iu->nick, bu->status ? : bu->status_msg ); } + else if( !( bu->flags & BEE_USER_ONLINE ) ) + { + irc_send_num( irc, 301, "%s :%s", iu->nick, "User is offline" ); + } } else { @@ -251,7 +255,8 @@ void irc_send_who( irc_t *irc, GSList *l, const char *channel ) /* TODO(wilmer): Restore away/channel information here */ irc_send_num( irc, 352, "%s %s %s %s %s %c :0 %s", channel ? : "*", iu->user, iu->host, irc->root->host, - iu->nick, 'H', iu->fullname ); + iu->nick, iu->flags & IRC_USER_AWAY ? 'G' : 'H', + iu->fullname ); l = l->next; } -- cgit v1.2.3