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

View File

@ -25,6 +25,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
weechat.look.save_{config|layout}_on_exit
* api: add integer return code for functions hook_{signal|hsignal}_send
* guile: fix module used after unload of a script
* irc: fix parsing of nick in host when '!' is not found (bug #41640)
* lua: fix interpreter used after unload of a script
* perl: fix context used after unload of a script
* python: fix interpreter used after unload of a script

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)