Changeset 814aa52 for irc.c


Ignore:
Timestamp:
2010-06-03T11:00:45Z (14 years ago)
Author:
Sven Moritz Hallberg <pesco@…>
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.
Message:

merge in bitlbee 1.2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r5f8ab6a9 r814aa52  
    5555{
    5656        irc_t *irc = set->data;
     57        char *test;
     58        gsize test_bytes = 0;
    5759        GIConv ic, oc;
    5860
     
    6062                value = g_strdup( "utf-8" );
    6163
     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       
    6282        if( ( ic = g_iconv_open( "utf-8", value ) ) == (GIConv) -1 )
    6383        {
    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 );
    6985                return NULL;
    7086        }
     
    175191        s = set_add( &irc->set, "charset", "utf-8", set_eval_charset, irc );
    176192        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 );
    177194        s = set_add( &irc->set, "debug", "false", set_eval_bool, irc );
    178195        s = set_add( &irc->set, "default_target", "root", NULL, irc );
    179196        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 );
    180198        s = set_add( &irc->set, "handle_unknown", "root", NULL, irc );
    181199        s = set_add( &irc->set, "halfop_buddies", "encrypted", set_eval_halfop_buddies, irc );
     
    192210        s = set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc );
    193211        s = set_add( &irc->set, "strip_html", "true", NULL, irc );
     212        s = set_add( &irc->set, "timezone", "local", set_eval_timezone, irc );
    194213        s = set_add( &irc->set, "to_char", ": ", set_eval_to_char, irc );
    195214        s = set_add( &irc->set, "typing_notice", "false", set_eval_bool, irc );
Note: See TracChangeset for help on using the changeset viewer.