mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Send NICK change before 001 request so that ircII also knows our real nick.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2211 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
cb6e1286cd
commit
fe8971ac8f
@ -200,12 +200,22 @@ static void dump_join(IRC_CHANNEL_REC *channel, CLIENT_REC *client)
|
||||
}
|
||||
}
|
||||
|
||||
void proxy_client_reset_nick(CLIENT_REC *client)
|
||||
{
|
||||
if (client->server == NULL ||
|
||||
strcmp(client->nick, client->server->nick) == 0)
|
||||
return;
|
||||
|
||||
proxy_outdata(client, ":%s!proxy NICK :%s\n",
|
||||
client->nick, client->server->nick);
|
||||
|
||||
g_free(client->nick);
|
||||
client->nick = g_strdup(client->server->nick);
|
||||
}
|
||||
|
||||
void proxy_dump_data(CLIENT_REC *client)
|
||||
{
|
||||
if (client->server != NULL) {
|
||||
g_free(client->nick);
|
||||
client->nick = g_strdup(client->server->nick);
|
||||
}
|
||||
proxy_client_reset_nick(client);
|
||||
|
||||
/* welcome info */
|
||||
proxy_outdata(client, ":%s 001 %s :Welcome to the Internet Relay Network\n", client->proxy_address, client->nick);
|
||||
|
@ -358,18 +358,6 @@ static void sig_server_event(IRC_SERVER_REC *server, const char *line,
|
||||
g_free(event);
|
||||
}
|
||||
|
||||
static void proxy_client_reset_nick(CLIENT_REC *client)
|
||||
{
|
||||
if (strcmp(client->nick, client->server->nick) == 0)
|
||||
return;
|
||||
|
||||
proxy_outdata(client, ":%s!proxy NICK :%s\n",
|
||||
client->nick, client->server->nick);
|
||||
|
||||
g_free(client->nick);
|
||||
client->nick = g_strdup(client->server->nick);
|
||||
}
|
||||
|
||||
static void event_connected(IRC_SERVER_REC *server)
|
||||
{
|
||||
GSList *tmp;
|
||||
|
@ -39,6 +39,7 @@ void proxy_listen_deinit(void);
|
||||
void proxy_settings_init(void);
|
||||
|
||||
void proxy_dump_data(CLIENT_REC *client);
|
||||
void proxy_client_reset_nick(CLIENT_REC *client);
|
||||
|
||||
void proxy_outdata(CLIENT_REC *client, const char *data, ...);
|
||||
void proxy_outdata_all(IRC_SERVER_REC *server, const char *data, ...);
|
||||
|
Loading…
Reference in New Issue
Block a user