Changes in irc_im.c [5ebff60:b95d03b]
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
r5ebff60 rb95d03b 235 235 } else { 236 236 /* Modules can swallow messages. */ 237 return TRUE;237 goto cleanup; 238 238 } 239 239 } … … 250 250 wrapped = word_wrap(msg, 425); 251 251 irc_send_msg(iu, "PRIVMSG", dst, wrapped, prefix); 252 253 252 g_free(wrapped); 253 254 cleanup: 254 255 g_free(prefix); 255 256 g_free(msg); … … 291 292 292 293 irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL); 294 295 g_string_free(msg, TRUE); 293 296 294 297 return TRUE; … … 695 698 irc_t *irc = bee->ui_data; 696 699 irc_channel_t *ic = c->ui_data, *oic; 697 char stripped[MAX_NICK_LENGTH + 1], *full_name; 700 char *stripped, *full_name; 701 gsize bytes_written; 698 702 699 703 if (ic == NULL) { … … 706 710 } 707 711 708 strncpy(stripped, name, MAX_NICK_LENGTH); 709 stripped[MAX_NICK_LENGTH] = '\0'; 712 stripped = g_convert_with_fallback(name, -1, "ASCII//TRANSLIT", "UTF-8", "", NULL, &bytes_written, NULL); 713 if (bytes_written > MAX_NICK_LENGTH) { 714 stripped[MAX_NICK_LENGTH] = '\0'; 715 } 716 710 717 irc_channel_name_strip(stripped); 711 718 if (set_getbool(&bee->set, "lcnicks")) { … … 714 721 715 722 if (stripped[0] == '\0') { 723 g_free(stripped); 716 724 return FALSE; 717 725 } 718 726 719 727 full_name = g_strdup_printf("#%s", stripped); 728 g_free(stripped); 720 729 if ((oic = irc_channel_by_name(irc, full_name))) { 721 730 char *type, *chat_type;
Note: See TracChangeset
for help on using the changeset viewer.