Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r2ff2076 r94d52d64  
    2828#include "crypting.h"
    2929#include "ipc.h"
    30 #include "dcc.h"
    31 
    32 #include <regex.h>
    33 #include <netinet/in.h>
    3430
    3531static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond );
     
    324320                        }
    325321                       
    326                         if( ( cs = set_getstr( &irc->set, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) )
     322                        if( ( cs = set_getstr( &irc->set, "charset" ) ) )
    327323                        {
    328324                                conv[IRC_MAX_LINE] = 0;
    329                                 if( do_iconv( cs, "UTF-8", lines[i], conv, 0, IRC_MAX_LINE - 2 ) != -1 )
    330                                         lines[i] = conv;
     325                                if( do_iconv( cs, "UTF-8", lines[i], conv, 0, IRC_MAX_LINE - 2 ) == -1 )
     326                                {
     327                                        if( irc->status & USTATUS_LOGGED_IN )
     328                                                irc_usermsg( irc, "ERROR: Charset mismatch detected. The charset "
     329                                                                  "setting is currently set to %s, so please make "
     330                                                                  "sure your IRC client will send and accept text in "
     331                                                                  "that charset, or tell BitlBee which charset to "
     332                                                                  "expect by changing the charset setting. See "
     333                                                                  "`help set charset' for more information. Your "
     334                                                                  "message was ignored.", cs );
     335                                        *conv = 0;
     336                                }
     337                                lines[i] = conv;
    331338                        }
    332339                       
     
    985992                        return( 1 );
    986993                }
    987                 else if( g_strncasecmp( s + 1, "DCC", 3 ) == 0 )
    988                 {
    989                         if( u && u->ic && u->ic->acc->prpl->transfer_request )
    990                         {
    991                                 file_transfer_t *ft = dcc_request( u->ic, s + 5 );
    992                                 if ( ft )
    993                                         u->ic->acc->prpl->transfer_request( u->ic, ft, u->handle );
    994                         }
    995                         return( 1 );
    996                 }               
    997994                else
    998995                {
    999                         irc_usermsg( irc, "Supported CTCPs are ACTION, VERSION, PING, TYPING, DCC" );
     996                        irc_usermsg( irc, "Non-ACTION CTCP's aren't supported" );
    1000997                        return( 0 );
    1001998                }
Note: See TracChangeset for help on using the changeset viewer.