Raw events will not return $chan as err0r states.
Also, you are searching for "allow" in the long gate. That will never be there.
I am not sure what is meant by allow, but I am assuming that allow is supposed to be a variable you set to allow gates to whisper you. I am thinking you want something more like...
raw Whisper:*: {
if ( $ial($nick,1) !isin %allow && $nick !isop $1 ) { halt }
; if the gate is in allow or the nick is an op, it will continue.. otherwise it stops...
}
menu nicklist {
Allow Whisper: { set %allow $addtok(%allow, $ial($1,1), 32) }
}
I think this works;)