Changeset 7d31002
- Timestamp:
- 2006-03-31T21:09:36Z (19 years ago)
- Branches:
- master
- Children:
- e6e1f18
- Parents:
- e27661d
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.c
re27661d r7d31002 355 355 for( i = 0; *lines[i] != '\0'; i ++ ) 356 356 { 357 char conv[IRC_MAX_LINE+1]; 358 357 359 /* [WvG] Because irc_tokenize splits at every newline, the lines[] list 358 360 should end with an empty string. This is why this actually works. … … 367 369 } 368 370 369 if( ( cs = set_getstr( irc, "charset" ) ) )371 if( ( cs = set_getstr( irc, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) ) 370 372 { 371 char conv[IRC_MAX_LINE+1];372 373 373 conv[IRC_MAX_LINE] = 0; 374 374 if( do_iconv( cs, "UTF-8", lines[i], conv, 0, IRC_MAX_LINE - 2 ) != -1 ) 375 strcpy( lines[i], conv );375 lines[i] = conv; 376 376 } 377 377 … … 588 588 589 589 strip_newlines( line ); 590 if( ( cs = set_getstr( irc, "charset" ) ) )590 if( ( cs = set_getstr( irc, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) ) 591 591 { 592 592 char conv[IRC_MAX_LINE+1]; -
root_commands.c
re27661d r7d31002 753 753 else 754 754 { 755 char utf8[1024];756 757 755 irc_usermsg( irc, "Setting your name to `%s'", cmd[2] ); 758 756 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] ); 764 758 } 765 759 }
Note: See TracChangeset
for help on using the changeset viewer.