[color:green]; when you join any channel[/color]
on *:JOIN:#: {
[color:green]; add the channel to a list - people are not allowed to msg you from those[/color]
%chans = %chans $chan
[color:green]; remove the channel after 10 secs[/color]
.timer 1 10 %chans = $remtok(%chans,$chan,1,32)
}
[color:green] [/color]
[color:green]; when you receive a PM[/color]
on *:OPEN:?:*: {
[color:green]; create a setting to detect what we want[/color]
set %tmp 1
[color:green]; check if the user is in a forbidden channel[/color]
var %i = $numtok(%chan,32)
while (%i) { if ($nick ison $gettok(%chan,%i,32)) unset %tmp | dec %i }
[color:green]; if not found, ignore, else allow[/color]
if (%tmp) { unset %tmp }
else { .timer 1 0 close -m $nick }
}