- Timestamp:
- 2010-06-03T11:00:45Z (14 years ago)
- Branches:
- master
- Children:
- a6b2f13
- Parents:
- 5f8ab6a9 (diff), f4bcc22 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.c
r5f8ab6a9 r814aa52 55 55 { 56 56 irc_t *irc = set->data; 57 char *test; 58 gsize test_bytes = 0; 57 59 GIConv ic, oc; 58 60 … … 60 62 value = g_strdup( "utf-8" ); 61 63 64 if( ( oc = g_iconv_open( value, "utf-8" ) ) == (GIConv) -1 ) 65 { 66 return NULL; 67 } 68 69 /* Do a test iconv to see if the user picked an IRC-compatible 70 charset (for example utf-16 goes *horribly* wrong). */ 71 if( ( test = g_convert_with_iconv( " ", 1, oc, NULL, &test_bytes, NULL ) ) == NULL || 72 test_bytes > 1 ) 73 { 74 g_free( test ); 75 g_iconv_close( oc ); 76 irc_usermsg( irc, "Unsupported character set: The IRC protocol " 77 "only supports 8-bit character sets." ); 78 return NULL; 79 } 80 g_free( test ); 81 62 82 if( ( ic = g_iconv_open( "utf-8", value ) ) == (GIConv) -1 ) 63 83 { 64 return NULL; 65 } 66 if( ( oc = g_iconv_open( value, "utf-8" ) ) == (GIConv) -1 ) 67 { 68 g_iconv_close( ic ); 84 g_iconv_close( oc ); 69 85 return NULL; 70 86 } … … 175 191 s = set_add( &irc->set, "charset", "utf-8", set_eval_charset, irc ); 176 192 s = set_add( &irc->set, "color_encrypted", "true", set_eval_bool, irc ); 193 s = set_add( &irc->set, "control_channel", irc->channel, set_eval_control_channel, irc ); 177 194 s = set_add( &irc->set, "debug", "false", set_eval_bool, irc ); 178 195 s = set_add( &irc->set, "default_target", "root", NULL, irc ); 179 196 s = set_add( &irc->set, "display_namechanges", "false", set_eval_bool, irc ); 197 s = set_add( &irc->set, "display_timestamps", "true", set_eval_bool, irc ); 180 198 s = set_add( &irc->set, "handle_unknown", "root", NULL, irc ); 181 199 s = set_add( &irc->set, "halfop_buddies", "encrypted", set_eval_halfop_buddies, irc ); … … 192 210 s = set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc ); 193 211 s = set_add( &irc->set, "strip_html", "true", NULL, irc ); 212 s = set_add( &irc->set, "timezone", "local", set_eval_timezone, irc ); 194 213 s = set_add( &irc->set, "to_char", ": ", set_eval_to_char, irc ); 195 214 s = set_add( &irc->set, "typing_notice", "false", set_eval_bool, irc );
Note: See TracChangeset
for help on using the changeset viewer.