diff options
author | Derp Derpingston <rjs3275@g.rit.edu> | 2014-05-11 06:12:08 -0700 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-05-12 04:52:42 -0400 |
commit | 17671ec69442cfd3a421720ef78b504e3652bc16 (patch) | |
tree | 472458bf2ee5b46fa21bcf696b17969ccd744e8b /src/common | |
parent | 187c04f7e218050c1a942ec07df7cbe1f42dc8ec (diff) |
Fixed truncation of the reason when receiving a KILL message.
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
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/proto-irc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index fa5446c4..34b4ece1 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -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'): |