From c1ec6d1039317342ed339f2ca1b52e2f4f3b07d3 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 20 Jan 2012 01:31:53 +0100 Subject: allow for disabling the filtering mechanism --- src/common/cfgfiles.c | 4 ++++ src/common/server.c | 11 +++++++---- src/common/text.c | 11 +++++++---- src/common/xchat.h | 1 + 4 files changed, 19 insertions(+), 8 deletions(-) (limited to 'src/common') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 130ad9d9..47d615e0 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -581,6 +581,9 @@ const struct prefs vars[] = { {"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL}, {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, {"text_max_lines", P_OFFINT (max_lines), TYPE_INT}, +#ifdef WIN32 + {"text_nonbmp", P_OFFINT (text_nonbmp), TYPE_BOOL}, +#endif {"text_replay", P_OFFINT (text_replay), TYPE_BOOL}, {"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL}, {"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL}, @@ -714,6 +717,7 @@ load_config (void) prefs.autodccsend = 2; /* browse mode */ #ifdef WIN32 prefs.identd = 1; + prefs.text_nonbmp = 1; #endif strcpy (prefs.gui_license, ""); strcpy (prefs.spell_langs, g_getenv ("LC_ALL") ? g_getenv ("LC_ALL") : "en_US"); diff --git a/src/common/server.c b/src/common/server.c index 53e877e3..fb50cc8a 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -402,10 +402,13 @@ server_inline (server *serv, char *line, int len) } #ifdef WIN32 - cleaned_line = text_replace_non_bmp (line, len, &cleaned_len); - if (cleaned_line != NULL ) { - line = cleaned_line; - len = cleaned_len; + if (prefs.text_nonbmp) + { + cleaned_line = text_replace_non_bmp (line, len, &cleaned_len); + if (cleaned_line != NULL ) { + line = cleaned_line; + len = cleaned_len; + } } #endif diff --git a/src/common/text.c b/src/common/text.c index 93392d1a..64102908 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -374,11 +374,14 @@ scrollback_load (session *sess) if (text) { text = strip_color (text + 1, -1, STRIP_COLOR); - cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); - if (cleaned_text != NULL) + if (prefs.text_nonbmp) { - g_free (text); - text = cleaned_text; + cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); + if (cleaned_text != NULL) + { + g_free (text); + text = cleaned_text; + } } fe_print_text (sess, text, stamp); g_free (text); diff --git a/src/common/xchat.h b/src/common/xchat.h index 6815cc39..ba9040ca 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -307,6 +307,7 @@ struct xchatprefs unsigned int emoticons; unsigned int tab_icons; unsigned int tab_xp; + unsigned int text_nonbmp; #endif unsigned int ctcp_number_limit; /*flood */ -- cgit 1.4.1