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

Fix check of IRC ignore when channel is specified in ignore (problem with PRIVMSG queries)

This commit is contained in:
Sebastien Helleu
2010-03-29 12:25:28 +02:00
parent 485e884751
commit 88853df080
4 changed files with 28 additions and 12 deletions
+9 -4
View File
@@ -1082,7 +1082,7 @@ void
irc_server_parse_message (const char *message, char **nick, char **host,
char **command, char **channel, char **arguments)
{
const char *pos, *pos2, *pos3, *pos4;
const char *pos, *pos2, *pos3, *pos4, *pos5;
if (nick)
*nick = NULL;
@@ -1170,6 +1170,7 @@ irc_server_parse_message (const char *message, char **nick, char **host,
}
if (pos3)
{
pos4 = pos3;
pos3++;
while (pos3[0] == ' ')
{
@@ -1177,15 +1178,19 @@ irc_server_parse_message (const char *message, char **nick, char **host,
}
if (irc_channel_is_channel (pos3))
{
pos4 = strchr (pos3, ' ');
pos5 = strchr (pos3, ' ');
if (channel)
{
if (pos4)
*channel = weechat_strndup (pos3, pos4 - pos3);
if (pos5)
*channel = weechat_strndup (pos3, pos5 - pos3);
else
*channel = strdup (pos3);
}
}
else if (channel && !*channel)
{
*channel = weechat_strndup (pos2, pos4 - pos2);
}
}
}
}