Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    rb95d03b r5ebff60  
    235235                        } else {
    236236                                /* Modules can swallow messages. */
    237                                 goto cleanup;
     237                                return TRUE;
    238238                        }
    239239                }
     
    250250        wrapped = word_wrap(msg, 425);
    251251        irc_send_msg(iu, "PRIVMSG", dst, wrapped, prefix);
     252
    252253        g_free(wrapped);
    253 
    254 cleanup:
    255254        g_free(prefix);
    256255        g_free(msg);
     
    292291
    293292        irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL);
    294 
    295         g_string_free(msg, TRUE);
    296293
    297294        return TRUE;
     
    698695        irc_t *irc = bee->ui_data;
    699696        irc_channel_t *ic = c->ui_data, *oic;
    700         char *stripped, *full_name;
    701         gsize bytes_written;
     697        char stripped[MAX_NICK_LENGTH + 1], *full_name;
    702698
    703699        if (ic == NULL) {
     
    710706        }
    711707
    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 
     708        strncpy(stripped, name, MAX_NICK_LENGTH);
     709        stripped[MAX_NICK_LENGTH] = '\0';
    717710        irc_channel_name_strip(stripped);
    718711        if (set_getbool(&bee->set, "lcnicks")) {
     
    721714
    722715        if (stripped[0] == '\0') {
    723                 g_free(stripped);
    724716                return FALSE;
    725717        }
    726718
    727719        full_name = g_strdup_printf("#%s", stripped);
    728         g_free(stripped);
    729720        if ((oic = irc_channel_by_name(irc, full_name))) {
    730721                char *type, *chat_type;
Note: See TracChangeset for help on using the changeset viewer.