From 8b403f8c2497b6afe0c6650693822f7d21ccbfea Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 6 May 2011 21:57:12 +0300 Subject: [PATCH] Try not to mistake RPL_WHOWAS_TIME as RPL_WHOISLOGGEDIN It seems that some daemons also use the same numeric for RPL_WHOWAS_TIME (http://www.alien.net.au/irc/irc2numerics.html) even though I could not find an actual example. Therefore, to be safe, we only consider a message to be RPL_WHOISLOGGEDIN if the trailing part is "is logged in as". Fixes: https://bugs.freedesktop.org/34796 --- src/idle-contact-info.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/idle-contact-info.c b/src/idle-contact-info.c index db24587..37e0331 100644 --- a/src/idle-contact-info.c +++ b/src/idle-contact-info.c @@ -362,12 +362,17 @@ static IdleParserHandlerResult _whois_idle_handler(IdleParser *parser, IdleParse static IdleParserHandlerResult _whois_logged_in_handler(IdleParser *parser, IdleParserMessageCode code, GValueArray *args, gpointer user_data) { IdleConnection *conn = IDLE_CONNECTION(user_data); ContactInfoRequest *request; + const gchar *msg; const gchar *nick; const gchar *field_values[2] = {NULL, NULL}; if (!_is_valid_response(conn, args)) return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; + msg = g_value_get_string(g_value_array_get_nth(args, 2)); + if (g_strcmp0(msg, "is logged in as")) + return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; + request = g_queue_peek_head(conn->contact_info_requests); if (request->contact_info == NULL) -- 1.7.4.4