return 0;
return 1;
unsigned int mode_chanparam(struct chanNode *chan, char *setter, char *modestr) {    unsigned int mode = 0, i = 0, tok = 0;    char *temp;    struct banlist *ban;    struct modeparam mp;    struct userlist *hUserList;        if((!chan) || (blankstr(setter)))        return 0;        temp = (char*)callocm(MAX_LEN, sizeof(char));    if(temp == NULL)        return 0;        for(i = 0;i < strlen(modestr);i++) {        if(modestr[i] != ' ') {            if((modestr[i] == '+') || (modestr[i] == '-'))                continue;                        if(mode_getparam(&mp, modestr, ++tok) == NULL) {                freem(temp);                return 0;            }                        if(mp.mode != 'b') {                hUserList = chan_get_userlist(user_get_handle(mp.param), chan);                if(hUserList == NULL)                    continue;                                mode = hUserList->chan_mode;            }            switch(mp.mode) {                case 'o':                    mode = mp.set ? (mode | MODE_OP) : (mode & ~MODE_OP);                    if(hUserList == chan->me)                        mode_remove_user_bans(me, chan, 1);                    break;                                case 'h':                    mode = mp.set ? (mode | MODE_HALFOP) : (mode & ~MODE_HALFOP);                    if(hUserList == chan->me)                        mode_remove_user_bans(me, chan, 1);                    break;                                case 'v':                    mode = mp.set ? (mode | MODE_VOICE) : (mode & ~MODE_VOICE);                    break;                                case 'b':                    if(mp.set) {                        if(matchstr(mp.param, me->hostmask))                            irc_mode(chan->name, "-b %s", mp.param);                        ban = mode_addban(chan, mp.param);                        xstrcpy(ban->setby, setter, MAX_LEN);                        ban->date = time(NULL);                    }                    else {                        mode_delban(chan, mp.param);                    }                    break;            }            if(mp.mode != 'b')                hUserList->chan_mode = mode;        }        else {            break;        }    }        freem(temp);    return 1;}