diff options
author | Timo Sirainen <cras@irssi.org> | 2000-05-25 13:15:57 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-05-25 13:15:57 +0000 |
commit | 5896d8350da72bd5fac9610166f6ff716b648449 (patch) | |
tree | b3686d030257e8ff2525c810089e6ed051471613 | |
parent | 69d15cfd79a46f5e32905bd1dfaa90cc1847d3af (diff) | |
download | irssi-5896d8350da72bd5fac9610166f6ff716b648449.zip |
When connecting, USER's second (and third?) parameters sometimes are
meaningful, server won't let more than one people in from host specified in
second parameter. Since irssi always set both of these to "-", only one
Irssi could connect to the server.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@236 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/irc/core/irc-server.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/irc/core/irc-server.c b/src/irc/core/irc-server.c index a21d9a1f..6bfdff39 100644 --- a/src/irc/core/irc-server.c +++ b/src/irc/core/irc-server.c @@ -73,6 +73,7 @@ void irc_server_connect_free(IRC_SERVER_CONNECT_REC *rec) static void server_init(IRC_SERVER_REC *server) { IRC_SERVER_CONNECT_REC *conn; + char hostname[100]; g_return_if_fail(server != NULL); @@ -93,7 +94,12 @@ static void server_init(IRC_SERVER_REC *server) /* send user/realname */ server->cmdcount = 0; - irc_send_cmdv(server, "USER %s - - :%s", conn->username, conn->realname); + + if (gethostname(hostname, sizeof(hostname)) != 0 || *hostname == '\0') + strcpy(hostname, "xx"); + + irc_send_cmdv(server, "USER %s %s %s :%s", conn->username, hostname, + server->connrec->address, conn->realname); server->cmdcount = 0; } |