Changeset 7d31002


Ignore:
Timestamp:
2006-03-31T21:09:36Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e6e1f18
Parents:
e27661d
Message:

Tested and fixed one issue, and got rid of one more superfluous iconv call.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    re27661d r7d31002  
    355355                for( i = 0; *lines[i] != '\0'; i ++ )
    356356                {
     357                        char conv[IRC_MAX_LINE+1];
     358                       
    357359                        /* [WvG] Because irc_tokenize splits at every newline, the lines[] list
    358360                            should end with an empty string. This is why this actually works.
     
    367369                        }
    368370                       
    369                         if( ( cs = set_getstr( irc, "charset" ) ) )
     371                        if( ( cs = set_getstr( irc, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) )
    370372                        {
    371                                 char conv[IRC_MAX_LINE+1];
    372                                
    373373                                conv[IRC_MAX_LINE] = 0;
    374374                                if( do_iconv( cs, "UTF-8", lines[i], conv, 0, IRC_MAX_LINE - 2 ) != -1 )
    375                                         strcpy( lines[i], conv );
     375                                        lines[i] = conv;
    376376                        }
    377377                       
     
    588588       
    589589        strip_newlines( line );
    590         if( ( cs = set_getstr( irc, "charset" ) ) )
     590        if( ( cs = set_getstr( irc, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) )
    591591        {
    592592                char conv[IRC_MAX_LINE+1];
  • root_commands.c

    re27661d r7d31002  
    753753        else
    754754        {
    755                 char utf8[1024];
    756                
    757755                irc_usermsg( irc, "Setting your name to `%s'", cmd[2] );
    758756               
    759                 if( g_strncasecmp( set_getstr( irc, "charset" ), "none", 4 ) != 0 &&
    760                     do_iconv( set_getstr( irc, "charset" ), "UTF-8", cmd[2], utf8, 0, 1024 ) != -1 )
    761                         a->gc->prpl->set_info( a->gc, utf8 );
    762                 else
    763                         a->gc->prpl->set_info( a->gc, cmd[2] );
     757                a->gc->prpl->set_info( a->gc, cmd[2] );
    764758        }
    765759}
Note: See TracChangeset for help on using the changeset viewer.