Joins : HHGG (b90d6a7e@Test-4DCCF5FD.mibbit.com)
!kb HHGG Out
!ban HHGG Out
Chanserv sets mode +b *!*@Test-4DCCF5FD.mibbit.com
need to unban this way during !kb and !ban nick
Chanserv sets mode -b+b *!*@Test-4DCCF5FD.mibbit.com *!b90d6a7e@*
Code: Select all
## mibbitBan ##
set mibbitSkip {
*.mibbit.com
}
bind mode - "#% +b" mibbitBan
bind kick - * mibbitKick
proc mibbitBan {nk uh hn ch md banmask} {
if {![botisop $ch]} return
global mibbitSkip
set match 0
scan $banmask {%[^!]!%[^@]@%s} n u h
foreach host $mibbitSkip {
if {![string match -nocase $host $h]} continue
incr match
break
}
if {$match} {
pushmode $ch -b $banmask
pushmode $ch +b "*!$user@*"
} elseif {[regexp {id-(\d+).(.*?).mibbit.com} $h - x]} {
foreach n [chanlist $ch] {
if {[isbotnick $n]} continue
if {[isop $n $ch] || [isvoice $n $ch] || [validuser [nick2hand $n]]} continue
scan [getchanhost $n $ch] {%[^@]@%s} user host
if {[regexp {\d+} $user y]} {
if {[string equal $x $y]} {
pushmode $ch +b "*!$user@*"
utimer 300 [list putserv "MODE $chan -b $mask6"]
}
}
}
set ::mibbitban $banmask
}
}
proc mibbitKick {nk uh hn ch target why} {
if {![info exists ::mibbitban]} return
if {![botisop $ch]} return
set chhost [getchanhost $target $ch]
global mibbitSkip
set match 0
if {[scan $chhost {%[^@]@%s} u h] != 2} return
foreach host $mibbitSkip {
if {![string match -nocase $host $h]} continue
incr match
break
}
if {$match} {
pushmode $ch +b "*!$user@*"
utimer 300 [list putserv "MODE $chan -b $mask6"]
}
unset ::mibbitban
}