Just change #Channel to your channel. And type /bantime what it does is if the person doesnt stay in the channel for longer than the set time it bans them.
on *:JOIN:#Channel: { .timer 1 %bantime chknick $nick $chan }
alias CHKNick { if ($1 !ison $2) { ban $2 $1 } }
alias BANTime { if ($1 isnum) && (!$2-) { set %BANTime $1 | echo -a Bantime set to $calc(%BANTime / 60) Minutes/ $+ %BANTime Seconds. } }