1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 00:03:12 +02:00

irc: fix parsing of nick in host when '!' is not found (bug #41640)

This commit is contained in:
Felix Eckhofer
2014-02-20 08:35:23 +01:00
committed by Sebastien Helleu
parent 36641bc3d3
commit 7fb84bdb03
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -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)