Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Script to detect & ban Unicode spam
- ##
- ## Based on the mIRC script by Moros
- ##
- ## Requires Eggdrop 1.8 or greater
- ##
- ## Catches channel spam such as
- ## /!\ ΤHIЅ CHAⲚΝЕᒪ ዘAᏚ MOᏙᎬD ТΟ ΙRϹ.ᏞIᗷЕᖇA.ⅭΗᎪT #ᎻAΜRAᗪIО /︕⧵
- ## ⁄ǃ\ THE ЈΕWS HᎪVE TАΚEN ΟVER FᎡEΕⲚODᎬ, CHATS HАᏙΕ ⅯΟVᎬᎠ TO ΙRⲤ.LIBΕRᎪ.CΗAΤ /!\
- ##
- if {($version < "1.8")} { die "Eggdrop version 1.8+ required for Unicode spam detector!" }
- putlog "Unicode spam detector loaded"
- bind pubm - * unicodespam
- proc unicodespam {nick uhost handle chan args} {
- global botnick
- if {(![isop $botnick $chan])} { putlog "Unicode spam detected but I'm not op'd: $chan $nick $uhost $args"
- return
- }
- if {(![isop $nick $chan]) && (![isvoice $nick $chan])} {
- set count 0
- set text [stripcodes bcru $args]
- while {$count < 9} {
- set x [string index $text $count]
- set a [achr $x]
- if {($a == 9834) || ($a == 9835)} { return }
- if {($a > 255)} {
- putlog "Unicode spam detected: $chan $nick $uhost $args"
- set host [string tolower [lindex [split [getchanhost $nick $chan] @] 1]]
- newchanban $chan "*!*@$host" "Unicode Spam" "Unicode Spam" 1
- putserv "KICK $chan $nick :\00304(\00312<><>«\[\003 Unicode spam detected \00312\]»<><>\00304)"
- set count 10
- }
- incr count
- }
- }
- }
- proc achr {c} {
- set c [string range $c 0 0]
- set v 0
- scan $c %c v
- # return [expr $v]
- return $v
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement