Anti-Channel Advertisement
Jump to navigation
Jump to search
The following is a quick script created to punish users for advertising their channel if they are not voices or higher.
alias -l channels {
; Put each channel you wish to protect here, seperated by a comma
return #MyChannel1,#MyChannel2
}
alias -l punish {
; Put the command to perform when someone advertises here, the default is a five minute ban
; $regml(1) is the first channel advertised.
ban -ku300 $chan $nick 2 Advertising $regml(1)
}
; This is the event
on @*:TEXT:*:$($channels): {
; Checks if the text matches the regular expression, and executes the punishment if they are regular users on the channel
if ($nick isreg # && $regex($1-,/(?: |^)( $+ $chantypes $+ \S+)\b(?: |$)/)) punish
}