]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
Fixed truncation of the reason when receiving a KILL message.
authorDerp Derpingston <redacted>
Sun, 11 May 2014 13:12:08 +0000 (06:12 -0700)
committerTingPing <redacted>
Mon, 12 May 2014 08:52:42 +0000 (04:52 -0400)
The KILL handler thought the message started one word later than it did, and
would cut off the first word.  This change starts the reason in the correct
place, and shaves off a leading : if one is present.

Closes #977
Closes #774

src/common/proto-irc.c

index fa5446c451bf66c6fe06b5ac3cd3856ea9e3bafb..34b4ece1c58c75783aec8758ad9924eb6d3d203d 100644 (file)
@@ -1075,8 +1075,14 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
                        return;
 
                case WORDL('K','I','L','L'):
-                       EMIT_SIGNAL_TIMESTAMP (XP_TE_KILL, sess, nick, word_eol[5], NULL, NULL,
-                                                                                 0, tags_data->timestamp);
+                       {
+                               char *reason = word_eol[4];
+                               if (*reason == ':')
+                                       reason++;
+
+                               EMIT_SIGNAL_TIMESTAMP (XP_TE_KILL, sess, nick, reason, NULL, NULL,
+                                                                                         0, tags_data->timestamp);
+                       }
                        return;
 
                case WORDL('M','O','D','E'):