struct Client *acptr;
struct Channel *chptr;
if(acptr = findNUser(parv[1])) {
- if(chptr = FindChannel(parv[3]) && chptr->mode.altchan &&
+ if(IsChannelName(parv[3]) && strIsIrcCh(parv[3]) &&
+ (chptr = FindChannel(parv[3])) && chptr->mode.altchan &&
IsChannelName(chptr->mode.altchan) && strIsIrcCh(chptr->mode.altchan)) {
mode_a_check_altchan(acptr,chptr->mode.altchan);
}