diff options
author | Timo Sirainen <cras@irssi.org> | 2004-05-10 13:45:27 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-05-10 13:45:27 +0000 |
commit | fda6dce872739cfa42e21ff9338e6434b87cfdb4 (patch) | |
tree | 5036bb50684876f4c7ebc53c0d03e99a10e4cc74 /src | |
parent | e132cfab3e3390cb76c86148c5cd499abcbcfb79 (diff) | |
download | irssi-fda6dce872739cfa42e21ff9338e6434b87cfdb4.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/irc-servers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 235af039..b7247149 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -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'; |