mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-17 19:20:20 +00:00
Save iconv converters for input and output in the server.
These are then used with g_convert_with_iconv instead of making it create a new iconv converter every time for the given from-to-encoding pairs.
This commit is contained in:
@@ -487,7 +487,7 @@ dcc_write_chat (char *nick, char *text)
|
||||
if (dcc && dcc->dccstat == STAT_ACTIVE)
|
||||
{
|
||||
len = strlen (text);
|
||||
tcp_send_real (NULL, dcc->sok, dcc->serv->encoding, text, len);
|
||||
tcp_send_real (NULL, dcc->sok, dcc->serv->write_converter, text, len);
|
||||
send (dcc->sok, "\n", 1, 0);
|
||||
dcc->size += len;
|
||||
fe_dcc_update (dcc);
|
||||
@@ -509,7 +509,7 @@ dcc_chat_line (struct DCC *dcc, char *line)
|
||||
char portbuf[32];
|
||||
message_tags_data no_tags = MESSAGE_TAGS_DATA_INIT;
|
||||
|
||||
line = text_invalid_encoding_to_utf8 (line, -1, dcc->serv->encoding, NULL);
|
||||
line = text_convert_invalid (line, -1, dcc->serv->read_converter, unicode_fallback_string, NULL);
|
||||
|
||||
sess = find_dialog (dcc->serv, dcc->nick);
|
||||
if (!sess)
|
||||
|
||||
Reference in New Issue
Block a user