1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-25 18:52:22 -05:00

Removed CP1255-specific handling of server lines.

GLib's API is good enough now.
This commit is contained in:
Arnavion 2015-01-18 02:10:03 -08:00
parent ee17ec6b4f
commit 2e76a4e477
3 changed files with 2 additions and 14 deletions

View File

@ -514,8 +514,6 @@ dcc_chat_line (struct DCC *dcc, char *line)
message_tags_data no_tags = MESSAGE_TAGS_DATA_INIT;
len = strlen (line);
if (dcc->serv->using_cp1255)
len++; /* include the NUL terminator */
if (dcc->serv->encoding == NULL) /* system */
utf = g_locale_to_utf8 (line, len, NULL, &utf_len, NULL);
@ -528,9 +526,6 @@ dcc_chat_line (struct DCC *dcc, char *line)
len = utf_len;
}
if (dcc->serv->using_cp1255 && len > 0)
len--;
/* we really need valid UTF-8 now */
conv = text_validate (&line, &len);

View File

@ -567,7 +567,6 @@ typedef struct server
unsigned int have_except:1; /* ban exemptions +e */
unsigned int have_invite:1; /* invite exemptions +I */
unsigned int have_cert:1; /* have loaded a cert */
unsigned int using_cp1255:1; /* encoding is CP1255/WINDOWS-1255? */
unsigned int use_who:1; /* whether to use WHO command to get dcc_ip */
unsigned int sasl_mech; /* mechanism for sasl auth */
unsigned int sent_saslauth:1; /* have sent AUTHENICATE yet */

View File

@ -1754,7 +1754,6 @@ server_set_encoding (server *serv, char *new_encoding)
g_free (serv->encoding);
/* can be left as NULL to indicate system encoding */
serv->encoding = NULL;
serv->using_cp1255 = FALSE;
}
if (new_encoding)
@ -1766,14 +1765,9 @@ server_set_encoding (server *serv, char *new_encoding)
if (space)
space[0] = 0;
/* server_inline() uses this flag */
if (g_ascii_strcasecmp (serv->encoding, "CP1255") == 0 || g_ascii_strcasecmp (serv->encoding, "WINDOWS-1255") == 0)
{
serv->using_cp1255 = TRUE;
}
else if (g_ascii_strcasecmp (serv->encoding, "IRC") == 0)
{
/* Default legacy "IRC" encoding to utf-8. */
if (g_ascii_strcasecmp (serv->encoding, "IRC") == 0)
{
g_free (serv->encoding);
serv->encoding = g_strdup ("UTF-8");
}