Advertisement
Dawnstar

Simple chan prot snippet

Sep 17th, 2011
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 5.07 KB | None | 0 0
  1. ;;Simple chan prot as requested by bro banned, MrJeff, WarBlade & many others.
  2.  
  3. #prot1 off
  4. ctcp !@*:*:#:butthole
  5. on !@*:ctcpreply:*:butthole
  6. On ^1:text:*:#:detect $1-
  7. On ^1:notice:*:#:detect $1-
  8. On ^1:action:*:#:detect $1-
  9. alias detect {
  10.   If ($nick !isreg #) || ($me !isop #) Return
  11.   If (www. Isin $strip($1-)) || (http: Isin $strip($1-)) || ($chr(35) Isin $strip($1-)) || (/server Isin $strip($1-)) && ($chan !== $strip($1-)) { .butthole | Halt }
  12.   If ($regex($1-,/(bastard|vagina|cibai|lancau|fuck|puki|kimak|kontol|cipap)/g) > 0 ) { .butthole | halt }
  13.   If ($regex($1-,/[[:cntrl:]]/g) > 49) { .butthole | Halt }
  14.   If ($regex($strip($1-),/[a-z]/g) > 49) { .butthole | Halt }
  15.   If ($regex($strip($1-),/[0-9]/g) > 49) { .butthole | Halt }
  16.   If ($regex($strip($1-),/[ $chr(44) ]/g) > 49) { .butthole | .halt }
  17.   If ($regex($strip($1-),/[[:punct:]]/g) > 49) { .butthole | Halt }
  18.   If ($regex($strip($1-),/[€-ÿ|¡-ÿ]/g) > 49) { .butthole | Halt }
  19.   If ($regex($strip($1-),/./g) > 199) { .butthole | Halt }
  20.   If ($regex($strip($1-),/[ ]/g) > 49) { .butthole | Halt }
  21.   .inc -u3 $+(%,$nick,$chan,$1-) | If ($($+(%,$nick,$chan,$1-),2) = 3) { .butthole | Halt }
  22.   .hinc -u4m Row [ $+ [ $hash($chan,32) ] ] $hash($nick,32) 1
  23.   If ($hget(row [ $+ [ $hash($chan,32) ] ],$hash($nick,32)) > 4) { .butthole | Halt }
  24. }
  25. alias butthole {
  26.   if ($me isop #) {
  27.     .signal -n hp # $nick $1- %mylogo
  28.     .inc %kcon 1
  29.     .ignore -cnktu3 $nick
  30.     .hinc -u5m C $address($nick,3) | .bastardchild
  31.   }
  32. }
  33. On *:SIGNAL:hp:  {
  34.   var %l = $hget(J,N)
  35.   .hinc -u3m J N 1
  36.   if (%l isnum 0-18) { !kick $1- }
  37.   else { .timeronemorejustforfun 1 0.5 kick $1- }
  38. }
  39. alias bastardchild {
  40.   .timerg $+ # 1 $r(1,3) .raw -q mode # + $+ $str(b,$hget(c,*).item) $hget(c,1).item $hget(c,2).item $hget(c,3).item $hget(c,4).item $hget(c,5).item $hget(c,6).item $hget(c,7).item $hget(c,8).item $hget(c,9).item $hget(c,10).item $hget(c,11).item $hget(c,12).item
  41. }
  42. raw *:*: {
  43.   var %:N = $numeric
  44.   if (%:N == 001) { halt } | if (%:N == 002) { halt } | if (%:N == 003) { halt } | if (%:N == 004) { halt } | if (%:N == 005) { halt } | if (%:N == 006) { halt } | if (%:N == 007) { halt } | if (%:N == 008) { halt } | if (%:N == 009) { halt } | if (%:N == 250) { halt } | if (%:N == 251) { halt } | if (%:N == 252) { halt } | if (%:N == 253) { halt } | if (%:N == 254) { halt } | if (%:N == 255) { halt }
  45.   if (%:N == 265) { halt } | if (%:N == 266) { halt } | if (%:N == 353) { halt } | if (%:N == 302) { halt } | if (%:N == 366) { halt } | if (%:N == 367) { halt } | if (%:N == 368) { halt } | if (%:N == 372) { halt } | if (%:N == 375) { halt } | if (%:N == 376) { halt } | if (%:N == 401) { halt } | if (%:N == 441) { halt } | if (%:N == 442) { halt } | if (%:N == 478) { halt } | if (%:N == 494) { halt }
  46. }
  47. on @*:JOIN:#: {
  48.   set -u3 %nflood. [ $+ [ # ] ] $addtok(%nflood. [ $+ [ # ] ],$nick,44)
  49.   if ($gettok(%nflood. [ $+ [ # ] ],0,44) == $iif(%max.join,%max.join,4)) {
  50.     .timeromg.kick. [ $+ [ # ] ] -m 3 1000 hardcock #
  51.   }
  52. }
  53. alias hardcock {
  54.   kick $1 $($+(%,nflood.,$1),2) %mylogo
  55.   .timer $+ $r(100,999) 1 .5 mode # +R
  56.   .timer $+ $r(100,999) 1 30 mode # -R
  57. }
  58. #prot1 end
  59. #prot2 off
  60. on *:deop:#: {
  61.   if ($nick == chanserv) && ($opnick == $me) && ($nick != $me) { .timercbreopx 1 3 cs op # $me  | halt }
  62.   if ($opnick == $me) && ($nick != $me) { .timercbreop 1 3 cs op # $me | halt }
  63. }
  64. on *:kick:*: {
  65.   if ($nick == Chanserv) { halt }
  66.   if ($knick == $me) && ($nick != Chanserv) { .timercbrejoin 1 10 j # | .timercbhate 1 1.2 cs deop # $nick | halt }
  67.   if ($knick == $me) && ($nick == Chanserv) { ..timercbrejoin 1 15 j # | halt }
  68.   else { halt }
  69. }
  70. on @*:ban:#: {
  71.   if $banmask iswm $address($me,2) && $nick != $me { .timercbunban 1 2 mode # -b $banmask }
  72.   if $banmask iswm $address($me,5) && $nick != $me { .timerubname 1 0.25 mode # -b $banmask }
  73.   else { .halt }
  74. }
  75. #prot2 end
  76. alias view {
  77.    if  (%mylogo == $null) { .echo -a You have NOT set any logo yet duh! }
  78.             else { .echo -a Current logo is %mylogo }
  79. }
  80. menu menubar,channel {
  81.    -=Property of Cybersindiket Inc=-:.echo -a HQ http://cybersindiket-inc.tk | .echo -a News http://shallyrecordsnews.tk | .echo -a Chat via web http://a.md/shallyrecords | .echo -a I chat ONLY in my chan in #shallyrecords on webchat.
  82.    Logo:
  83.   .What?
  84.   ..Script has no logo so add your own:halt
  85.   ..set %mylogo $?="insert your logo here e.g Wet Pussy Script by MrJeff" | .echo -a Done setting
  86.   ..unset %mylogo | .echo -a Done resetting.
  87.   ..View:view
  88.   Chan Flood Prot * %cfprot1 *
  89.   .What?
  90.   ..All flood protection including swearing and mass join:halt
  91.   .on:.set %cfprot1 on | .enable #prot1
  92.   .off:.set %cfprot1 off | .disable #prot1
  93.   KBD Prot * %kbdprot *
  94.   .What?
  95.   ..Kick Ban Deop protection is passive and NOT revengeful in nature:halt
  96.   .on:.set %kbdprot on | .enable #prot2
  97.   .off:.set %kbdprot off | .disable #prot2
  98.   -
  99. }
  100. ;;copy and paste to your remote
  101. ;;addon requested by banned, MrJeff, WarBlade and others.
  102. ;;tested and works fine.
  103. ;;bug reports send a msg to the shoutbox @ http://blackscript.serveirc.com or join #shallyrecords if anyone is available.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement