All pastes #107957 Raw Edit

freeone3000

public c v1 · immutable
#107957 ·published 2006-07-31 05:38 UTC
rendered paste body
void check_message_type(char *msg, int len){        int type;        if (getting_location_str && !strncmp(msg + 1, "You are in ", 11)) {                get_location_str(msg + 1, len - 1);                return;        }        if ((type = check_if_ignored(msg, len)) < 0)                return;        //AFK...        if (afk) {                if (type == SEND_PM) {                        send_afk_message(msg + 1, type); //freeedit                        add_message_to_pm_log(msg + 1, len - 1);                } else if (is_talking_about_me(msg + 1, len - 1))                        send_afk_message(msg + 1, type);        }        char channum = *msg;        char *chanstr;        sprintf(channum, " @ %d", (int)channum);        char *part1;        char *part2;        part2 = strchr(msg, ']');        strncpy(part1, msg, strlen(msg)-strlen(part2));        strcat(part1, chanstr);        strcat(part1, part2);        msg = part1;        add_to_buffer(msg+1, len, type, 1);        //Should clean up chanstr, part1, and part2 here.}