rendered paste bodyproc pub:AntiPub {nick uhost hand channel arg} {
global pubs flags banpub ap devchan banchan devtime bantime puntype devnick nbdc nbdn
set rest [ap:cf $arg]
foreach pub $pubs {
if {[isop $nick $channel] || [matchattr $hand $flags $channel] || $ap == "off"} { return }
if {[string match -nocase $pub [string tolower $rest]]} {
if {$puntype == "1"} {
set devchan $channel
set devnick $nick
putquick "mode $channel -v $nick"
putserv "privmsg $channel :\00314Pub détectée '\0033$pub\00314' Dévoice \0034 [expr $devtime / 60] minutes\00314."
utimer $devtime {putquick "mode $devchan +v $devnick"}
return
}
if {$puntype == "2"} {
putserv "kick $channel $nick \00314Pub détectée '\0033$pub\00314'."
return
}
if {$puntype == "3"} {
set banpub "*!*@[lindex [split $uhost @] 1]"
set banchan $channel
putquick "mode $channel +b $banpub"
putserv "kick $channel $nick \00314Pub détectée '\0033$pub\00314'. Banni\0034 [expr $bantime / 60] minutes\00314."
utimer $bantime {pushmode $banchan -b $banpub}
return
}
}
}
}