mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Use only the first word from username when sending it to server.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1776 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
cac1cbf2cf
commit
1cb3f94eeb
@ -109,7 +109,7 @@ static void sig_server_looking(IRC_SERVER_REC *server)
|
|||||||
static void server_init(IRC_SERVER_REC *server)
|
static void server_init(IRC_SERVER_REC *server)
|
||||||
{
|
{
|
||||||
IRC_SERVER_CONNECT_REC *conn;
|
IRC_SERVER_CONNECT_REC *conn;
|
||||||
char hostname[100], *address, *ptr;
|
char hostname[100], *address, *ptr, *username;
|
||||||
|
|
||||||
g_return_if_fail(server != NULL);
|
g_return_if_fail(server != NULL);
|
||||||
|
|
||||||
@ -144,8 +144,14 @@ static void server_init(IRC_SERVER_REC *server)
|
|||||||
the last : char */
|
the last : char */
|
||||||
address = ptr+1;
|
address = ptr+1;
|
||||||
}
|
}
|
||||||
irc_send_cmdv(server, "USER %s %s %s :%s", conn->username, hostname,
|
|
||||||
|
username = g_strdup(conn->username);
|
||||||
|
ptr = strchr(username, ' ');
|
||||||
|
if (ptr != NULL) *ptr = '\0';
|
||||||
|
|
||||||
|
irc_send_cmdv(server, "USER %s %s %s :%s", username, hostname,
|
||||||
address, conn->realname);
|
address, conn->realname);
|
||||||
|
g_free(username);
|
||||||
|
|
||||||
server->cmdcount = 0;
|
server->cmdcount = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user