From 9d8e900687f6b13ebaa44d3278baa9dea29785a0 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 18 Oct 2013 14:05:04 -0400 Subject: [PATCH] Provide access to the user and host parts of RPL_WHOISUSER http://tools.ietf.org/html/rfc2812#section-5.1 specifies that RPL_WHOISUSER contains " * :". It would be useful for clients to have access to the user and host as well as the real name. --- src/idle-contact-info.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/idle-contact-info.c b/src/idle-contact-info.c index 07cd9a9..af85fdc 100644 --- a/src/idle-contact-info.c +++ b/src/idle-contact-info.c @@ -450,6 +450,14 @@ static IdleParserHandlerResult _whois_user_handler(IdleParser *parser, IdleParse field_values[0] = name; _insert_contact_field(request->contact_info, "fn", NULL, field_values); + name = g_value_get_string(g_value_array_get_nth(args, 1)); + field_values[0] = name; + _insert_contact_field(request->contact_info, "x-client-username", NULL, field_values); + + name = g_value_get_string(g_value_array_get_nth(args, 2)); + field_values[0] = name; + _insert_contact_field(request->contact_info, "x-client-hostname", NULL, field_values); + return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } -- 1.8.3.1