;
on @*:JOIN:#: .raw WHOIS $nick
;
raw 319:*:{
;
; An easy way to set up a kick message in an easy spot to change it. Just to make the message easier to read, I have
; set it across three lines. Yours might not be as long.
var %KickMessage
;
%KickMessage = :I have the right to decide which channels you may join. You may not be on $gettok($3-,%i,32) while I have
%KickMessage = %KickMessage anything to say about it. Furthermore, if I should join a channel where you are opped, I will
%KickMessage = %KickMessage take offense if you check my channels and find one that is disagreeable to your personal
%KickMessage = %KickMessage beliefs and kick me as a result, as your beliefs do not pertain to me.
;
var %BadChannels = #Chan2 #Chan3 #Chan4 | ; The list of channels we feel, in our inestimable wisdom, people should not be in
var %i = 1 | ; Loop index through the visible channels in 319
var %j = $comchan($2,0) | ; The number of common channels shared with $2 ($nick)
;
; While there are more channels to check for their evilness...
while ($gettok($3-,%i,32)) {
;
; If we find a channel that we feel they shouldn't be on...
if ($istok(%BadChannels,$ifmatch,32)) {
;
; Then while there are more common channels I share with $2 ($nick)...
while (%j) {
;
; If I'm opped in this channel, then kickban him with my haughty kick message in one data packet.
if ($comchan($2,%j).op) .raw mode $comchan($2,%j) +b $address($2,2) $+ $crlf $+ kick $comchan($2,%j) $2 %KickMessage
;
; Back up to the previous common channel
dec %j
}
;
; Since we have removed this evil person from all the channels we can, there is no need to continue looking to see if
; they match anymore appalling channels.
break
}
;
; Otherswise, try to go to the next channel and check it for foulness.
inc %i
}
}