Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on @*:text:*:*:{
- if ($network != Undernet) { halt }
- if ($nick !isreg $chan) { halt }
- if (($1 ison $chan) && ($2 ison $chan) && ($3 ison $chan) && ($4 ison $chan)) {
- ban -ku600 $chan $address($nick,2) Spam, spam, spam | auser uspam $address($nick,2)
- }
- if ($unicodecount($1-) >= 15) {
- if ($me isop #) {
- ban -u60 # $nick 2
- kick # $nick 0,12<15>0,2<15>12,1«[0 Unicode spam detected 12,1]»0,2<15>0,12<15>
- }
- if ($window(@Spam) == $null) { window -Cnbk0 +e @Spam }
- aline @Spam $timestamp $chan $nick $address($nick,1) $1-
- .auser uspam $address($nick,2) Unicode Spam $day
- halt
- }
- }
- on uspam:JOIN:#: {
- if (($me isop #) && ($nick isreg $chan) && (*undernet.org !iswm $site)) {
- kick # $nick 0 144,5<1>1500 144,5<1>150 144,5<1>15 Unicode spam previously detected from this address. 1,5<4>15 1,5<4>15 1,5<4>
- ban -u60 # $nick 2
- }
- }
- alias unicodecount {
- var %temp = $strip($1-)
- var %loop = 1
- var %length = $len(%temp)
- var %count = 0
- var %chr = 0
- while (%loop < %length) {
- %chr = $mid(%temp,%loop,1)
- if ($asc(%chr) > 255) { inc %count }
- inc %loop
- }
- return %count
- }
- on *:start:{
- .rlevel uspam
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement