diff options
author | Felix Eckhofer <felix@eckhofer.com> | 2014-02-20 08:35:23 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-02-20 08:35:23 +0100 |
commit | 7fb84bdb03cda38ddd8436f25119e0d7fd3ee6b5 (patch) | |
tree | 65ef7c156819ec9879c6642c399318f960075f42 /src | |
parent | 36641bc3d312f425a742d7610950772cc0483ea4 (diff) | |
download | weechat-7fb84bdb03cda38ddd8436f25119e0d7fd3ee6b5.zip |
irc: fix parsing of nick in host when '!' is not found (bug #41640)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-message.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index 1b0fc76bd..099c52eca 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -101,8 +101,12 @@ irc_message_parse (struct t_irc_server *server, const char *message, if (ptr_message[0] == ':') { /* read host/nick */ + pos3 = strchr (ptr_message, '@'); pos2 = strchr (ptr_message, '!'); pos = strchr (ptr_message, ' '); + /* if the prefix doesn't contain a '!', split the nick at '@' */ + if (!pos2 || (pos && pos2 > pos)) + pos2 = pos3; if (pos2 && (!pos || pos > pos2)) { if (nick) |