mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
e132cfab3e
commit
fda6dce872
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user