1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Never send hostname beginning with /+-[0-9]/ in USER command, that could

be interpreted as mode change with ircnet ircd.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3249 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2004-05-10 13:45:27 +00:00 committed by cras
parent e132cfab3e
commit fda6dce872

View File

@ -146,6 +146,16 @@ static void server_init(IRC_SERVER_REC *server)
if (*ptr == ':') *ptr = '_';
}
/* don't allow hostname to begin with number or '+', '-'. those
can be interpreted as ircnet ircd's mode parameter.
username/hostname parameters should probably be configurable since
they're only needed with some old servers which uses them to count
unique users. */
if ((hostname[0] >= '0' && hostname[0] <= '9') ||
hostname[0] == '+' || hostname[0] == '-')
hostname[0] = '_';
username = g_strdup(conn->username);
ptr = strchr(username, ' ');
if (ptr != NULL) *ptr = '\0';