1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Allow '@' characters in nick.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3287 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2004-08-24 06:31:08 +00:00 committed by cras
parent 685b887e8e
commit 259331e0b1

View File

@ -321,6 +321,8 @@ static int irc_receive_line(SERVER_REC *server, char **str, int read_socket)
static char *irc_parse_prefix(char *line, char **nick, char **address)
{
char *p;
*nick = *address = NULL;
/* :<nick> [["!" <user>] "@" <host>] SPACE */
@ -328,18 +330,24 @@ static char *irc_parse_prefix(char *line, char **nick, char **address)
if (*line != ':')
return line;
*nick = ++line;
*nick = ++line; p = NULL;
while (*line != '\0' && *line != ' ') {
if (*line == '!' || *line == '@') {
*line++ = '\0';
*address = line;
while (*line != '\0' && *line != ' ')
line++;
break;
p = line;
if (*line == '!')
break;
}
line++;
}
if (p != NULL) {
line = p;
*line++ = '\0';
*address = line;
while (*line != '\0' && *line != ' ')
line++;
}
if (*line == ' ') {
*line++ = '\0';
while (*line == ' ') line++;