Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r0e788f5 rc608891  
    3535static char *set_eval_password( set_t *set, char *value );
    3636static char *set_eval_bw_compat( set_t *set, char *value );
     37static char *set_eval_utf8_nicks( set_t *set, char *value );
    3738
    3839irc_t *irc_new( int fd )
     
    134135        s = set_add( &b->set, "to_char", ": ", set_eval_to_char, irc );
    135136        s = set_add( &b->set, "typing_notice", "false", set_eval_bool, irc );
     137        s = set_add( &b->set, "utf8_nicks", "false", set_eval_utf8_nicks, irc );
    136138
    137139        irc->root = iu = irc_user_new( irc, ROOT_NICK );
     
    962964}
    963965
     966static char *set_eval_utf8_nicks( set_t *set, char *value )
     967{
     968        irc_t *irc = set->data;
     969        gboolean val = bool2int( value );
     970       
     971        /* Do *NOT* unset this flag in the middle of a session. There will
     972           be UTF-8 nicks around already so if we suddenly disable support
     973           for them, various functions might behave strangely. */
     974        if( val )
     975                irc->status |= IRC_UTF8_NICKS;
     976        else if( irc->status & IRC_UTF8_NICKS )
     977                irc_rootmsg( irc, "You need to reconnect to BitlBee for this "
     978                                  "change to take effect." );
     979       
     980        return set_eval_bool( set, value );
     981}
     982
    964983void register_irc_plugin( const struct irc_plugin *p )
    965984{
Note: See TracChangeset for help on using the changeset viewer.