mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 04:13:32 +02:00
Replace \n with \r\n in irssiproxy source, fixes bug
This commit is contained in:
parent
6fcafc5993
commit
92d03fe11e
2 changed files with 27 additions and 27 deletions
|
|
@ -83,7 +83,7 @@ void proxy_outserver(CLIENT_REC *client, const char *data, ...)
|
|||
va_start(args, data);
|
||||
|
||||
str = g_strdup_vprintf(data, args);
|
||||
proxy_outdata(client, ":%s!%s@proxy %s\n", client->nick,
|
||||
proxy_outdata(client, ":%s!%s@proxy %s\r\n", client->nick,
|
||||
settings_get_str("user_name"), str);
|
||||
g_free(str);
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ void proxy_outserver_all(IRC_SERVER_REC *server, const char *data, ...)
|
|||
CLIENT_REC *rec = tmp->data;
|
||||
|
||||
if (rec->connected && rec->server == server) {
|
||||
proxy_outdata(rec, ":%s!%s@proxy %s\n", rec->nick,
|
||||
proxy_outdata(rec, ":%s!%s@proxy %s\r\n", rec->nick,
|
||||
settings_get_str("user_name"), str);
|
||||
}
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ void proxy_outserver_all_except(CLIENT_REC *client, const char *data, ...)
|
|||
|
||||
if (rec->connected && rec != client &&
|
||||
rec->server == client->server) {
|
||||
proxy_outdata(rec, ":%s!%s@proxy %s\n", rec->nick,
|
||||
proxy_outdata(rec, ":%s!%s@proxy %s\r\n", rec->nick,
|
||||
settings_get_str("user_name"), str);
|
||||
}
|
||||
}
|
||||
|
|
@ -169,7 +169,7 @@ static void dump_join(IRC_CHANNEL_REC *channel, CLIENT_REC *client)
|
|||
NICK_REC *nick = tmp->data;
|
||||
|
||||
if (str->len >= 500) {
|
||||
g_string_append_c(str, '\n');
|
||||
g_string_append_c(str, '\r\n');
|
||||
proxy_outdata(client, "%s", str->str);
|
||||
create_names_start(str, channel, client);
|
||||
first = TRUE;
|
||||
|
|
@ -186,21 +186,21 @@ static void dump_join(IRC_CHANNEL_REC *channel, CLIENT_REC *client)
|
|||
}
|
||||
g_slist_free(nicks);
|
||||
|
||||
g_string_append_c(str, '\n');
|
||||
g_string_append_c(str, '\r\n');
|
||||
proxy_outdata(client, "%s", str->str);
|
||||
g_string_free(str, TRUE);
|
||||
|
||||
proxy_outdata(client, ":%s 366 %s %s :End of /NAMES list.\n",
|
||||
proxy_outdata(client, ":%s 366 %s %s :End of /NAMES list.\r\n",
|
||||
client->proxy_address, client->nick, channel->name);
|
||||
if (channel->topic != NULL) {
|
||||
/* this is needed because the topic may be encoded into other charsets internaly */
|
||||
recoded = recode_out(SERVER(client->server), channel->topic, channel->name);
|
||||
proxy_outdata(client, ":%s 332 %s %s :%s\n",
|
||||
proxy_outdata(client, ":%s 332 %s %s :%s\r\n",
|
||||
client->proxy_address, client->nick,
|
||||
channel->name, recoded);
|
||||
g_free(recoded);
|
||||
if (channel->topic_time > 0)
|
||||
proxy_outdata(client, ":%s 333 %s %s %s %d\n",
|
||||
proxy_outdata(client, ":%s 333 %s %s %s %d\r\n",
|
||||
client->proxy_address, client->nick,
|
||||
channel->name, channel->topic_by, channel->topic_time);
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ void proxy_client_reset_nick(CLIENT_REC *client)
|
|||
g_strcmp0(client->nick, client->server->nick) == 0)
|
||||
return;
|
||||
|
||||
proxy_outdata(client, ":%s!proxy NICK :%s\n",
|
||||
proxy_outdata(client, ":%s!proxy NICK :%s\r\n",
|
||||
client->nick, client->server->nick);
|
||||
|
||||
g_free(client->nick);
|
||||
|
|
@ -236,13 +236,13 @@ void proxy_dump_data(CLIENT_REC *client)
|
|||
proxy_client_reset_nick(client);
|
||||
|
||||
/* welcome info */
|
||||
proxy_outdata(client, ":%s 001 %s :Welcome to the Internet Relay Network %s!%s@proxy\n", client->proxy_address, client->nick, client->nick, settings_get_str("user_name"));
|
||||
proxy_outdata(client, ":%s 002 %s :Your host is irssi-proxy, running version %s\n", client->proxy_address, client->nick, PACKAGE_VERSION);
|
||||
proxy_outdata(client, ":%s 003 %s :This server was created ...\n", client->proxy_address, client->nick);
|
||||
proxy_outdata(client, ":%s 001 %s :Welcome to the Internet Relay Network %s!%s@proxy\r\n", client->proxy_address, client->nick, client->nick, settings_get_str("user_name"));
|
||||
proxy_outdata(client, ":%s 002 %s :Your host is irssi-proxy, running version %s\r\n", client->proxy_address, client->nick, PACKAGE_VERSION);
|
||||
proxy_outdata(client, ":%s 003 %s :This server was created ...\r\n", client->proxy_address, client->nick);
|
||||
if (client->server == NULL || !client->server->emode_known)
|
||||
proxy_outdata(client, ":%s 004 %s %s %s oirw abiklmnopqstv\n", client->proxy_address, client->nick, client->proxy_address, PACKAGE_VERSION);
|
||||
proxy_outdata(client, ":%s 004 %s %s %s oirw abiklmnopqstv\r\n", client->proxy_address, client->nick, client->proxy_address, PACKAGE_VERSION);
|
||||
else
|
||||
proxy_outdata(client, ":%s 004 %s %s %s oirw abeIiklmnopqstv\n", client->proxy_address, client->nick, client->proxy_address, PACKAGE_VERSION);
|
||||
proxy_outdata(client, ":%s 004 %s %s %s oirw abeIiklmnopqstv\r\n", client->proxy_address, client->nick, client->proxy_address, PACKAGE_VERSION);
|
||||
|
||||
if (client->server != NULL && client->server->isupport_sent) {
|
||||
isupport_out = g_string_new(NULL);
|
||||
|
|
@ -267,7 +267,7 @@ void proxy_dump_data(CLIENT_REC *client)
|
|||
count = 0;
|
||||
if (paramstr->len > 0)
|
||||
g_string_truncate(paramstr, paramstr->len-1);
|
||||
g_string_append_printf(paramstr, " :are supported by this server\n");
|
||||
g_string_append_printf(paramstr, " :are supported by this server\r\n");
|
||||
proxy_outdata(client, "%s", paramstr->str);
|
||||
g_string_truncate(paramstr, 0);
|
||||
g_string_printf(paramstr, ":%s 005 %s ", client->proxy_address, client->nick);
|
||||
|
|
@ -281,9 +281,9 @@ void proxy_dump_data(CLIENT_REC *client)
|
|||
g_strfreev(paramlist);
|
||||
}
|
||||
|
||||
proxy_outdata(client, ":%s 251 %s :There are 0 users and 0 invisible on 1 servers\n", client->proxy_address, client->nick);
|
||||
proxy_outdata(client, ":%s 255 %s :I have 0 clients, 0 services and 0 servers\n", client->proxy_address, client->nick);
|
||||
proxy_outdata(client, ":%s 422 %s :MOTD File is missing\n", client->proxy_address, client->nick);
|
||||
proxy_outdata(client, ":%s 251 %s :There are 0 users and 0 invisible on 1 servers\r\n", client->proxy_address, client->nick);
|
||||
proxy_outdata(client, ":%s 255 %s :I have 0 clients, 0 services and 0 servers\r\n", client->proxy_address, client->nick);
|
||||
proxy_outdata(client, ":%s 422 %s :MOTD File is missing\r\n", client->proxy_address, client->nick);
|
||||
|
||||
/* user mode / away status */
|
||||
if (client->server != NULL) {
|
||||
|
|
@ -293,7 +293,7 @@ void proxy_dump_data(CLIENT_REC *client)
|
|||
client->server->usermode);
|
||||
}
|
||||
if (client->server->usermode_away) {
|
||||
proxy_outdata(client, ":%s 306 %s :You have been marked as being away\n",
|
||||
proxy_outdata(client, ":%s 306 %s :You have been marked as being away\r\n",
|
||||
client->proxy_address, client->nick);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue