Code: Select all
## ircCloudBan v.0.2 ##
set ircSkip {
*.irccloud.com
192.184.9.108
192.184.9.110
192.184.9.112
192.184.10.118
192.184.10.9
192.184.8.73
192.184.8.10
2001:67c:2f08::/48
}
bind mode - "#% +b" ircCloudBan
bind kick - * ircCloudKick
proc ircCloudBan {nk uh hn ch md banmask} {
if {![botisop $ch]} return
global ircSkip
set match 0
foreach host $ircSkip {
if {![string match -nocase $host $banmask]} continue
incr match
break
}
if {$match} {
pushmode $ch -b $banmask
set ::irccloudban $banmask
}
}
proc ircCloudKick {nk uh hn ch target why} {
if {![info exists ::irccloudban]} return
if {![botisop $ch]} return
set chhost [getchanhost $target $ch]
global ircSkip
set match 0
foreach host $ircSkip {
if {![string match -nocase $host $chhost]} continue
incr match
break
}
if {$match} {
lassign [split $chhost "@"] user
pushmode $ch +b "*!$user@*"
}
unset ::irccloudban
}