diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-02-20 08:39:18 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-02-20 08:39:18 +0100 |
commit | a15184a9bd7cd0ea07d40f6c2b5a66dbf1fd763e (patch) | |
tree | 94b448ee23d75d51bcf1ae8fe426cb3150978896 /src/plugins/irc | |
parent | 7fb84bdb03cda38ddd8436f25119e0d7fd3ee6b5 (diff) | |
download | weechat-a15184a9bd7cd0ea07d40f6c2b5a66dbf1fd763e.zip |
irc: fix parsing of nick/host when there is nothing after in message (malformed message)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-message.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index 099c52eca..8c3b842f2 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -127,6 +127,12 @@ irc_message_parse (struct t_irc_server *server, const char *message, ptr_message++; } } + else + { + if (host) + *host = strdup (ptr_message + 1); + ptr_message += strlen (ptr_message); + } } /* now we have: ptr_message --> "PRIVMSG #channel :hello!" */ |