westor

Twitch Link Protection & Permit for VitruxPT v2.0

Feb 5th, 2015
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.77 KB | None | 0 0
  1. alias -l nk { return ( $+ $nick $+ ): }
  2.  
  3. ON !*:PART:#: { unset %permit_block_ [ $+ [ $nick ] ] | unset %permit_ [ $+ [ $nick ] ] }
  4.  
  5. ON !*:TEXT:*:#: {
  6.   tokenize 32 $strip($1-,burci)
  7.   if ($1 == !link) {
  8.     if ($nick !isop $chan) && (!$check_modchixy($nick,$chan)) { .msg $chan $nk Error, You must be an channel moderator! | return }
  9.     if ($2 == on) {
  10.       if (%linkchixy) {
  11.         .msg # $nk Link protection is already enabled!
  12.         return
  13.       }
  14.       elseif (!%linkchixy) {
  15.         .msg # $nk Link protection enabled.
  16.         set %linkchixy 1
  17.         return
  18.       }
  19.     }
  20.     if ($2 == off) {
  21.       if (%linkchixy) {
  22.         .msg # $nk Link protection disabled.
  23.         unset %linkchixy
  24.         return
  25.       }
  26.       elseif (!%linkchixy) {
  27.         msg # $nk Link protection is already disabled!
  28.         return
  29.       }
  30.     }
  31.   }
  32.   if ($1 == !permit) {
  33.     if ($nick !isop $chan && (!$check_modchixy($nick,$chan)) { .msg $chan $nk Error, You must be an channel moderator! | return }
  34.     if (%linkchixy) {
  35.       if (!$2) { .msg $chan $nk Error, Please specify a nickname! | return }
  36.       if (%permit_ [ $+ [ $2 ] ]) { .msg $chan $nk Error, This user $qt($2) is already into the permit list! | return }
  37.       set -eu180 %permit_ [ $+ [ $2 ] ] 1
  38.       unset %permit_block_ [ $+ [ $2 ] ]
  39.       .msg $chan ( $+ $2 $+ ): You have 3 min to post a link.
  40.       return
  41.     }
  42.     elseif (!%linkchixy) { .msg $chan $nk Error, The Link Protection is NOT enabled! | return }
  43.   }
  44.   if (%linkchixy) {
  45.     if ($nick isop #) { return }
  46.     if ($check_modchixy($nick,$chan)) { return }
  47.     if ($check_regchixy($nick,$chan)) { return }
  48.     if ($check_subchixy($nick,$chan)) { return }
  49.     if (*reddit.com/r/smite* !iswm $1-) && (*www.* iswm $1- || *http://* iswm $1- || *.com* iswm $1- || *.tv* iswm $1- || *.nl* iswm $1- || *.sh* iswm $1- || *.net* iswm $1- || *.me* iswm $1-) {
  50.       if (%permit_ [ $+ [ $nick ] ]) {
  51.         unset %permit_ [ $+ [ $nick ] ]
  52.         unset %permit_block_ [ $+ [ $2 ] ]
  53.         .msg $chan $nk Ok, You have post your link.
  54.         return
  55.       }
  56.       if (!%permit_block_ [ $+ [ $nick ] ]) {
  57.         set -eu180 %permit_block_ [ $+ [ $nick ] ] 1
  58.         .msg $chan /timeout $nick 10
  59.         .msg $chan $nk Please ask permission before posting a link! - [Link] [Warning]
  60.         return
  61.       }
  62.       if (%permit_block_ [ $+ [ $nick ] ] == 1) {
  63.         set -eu86400 %permit_block_ [ $+ [ $nick ] ] 2
  64.         .msg $chan /timeout $nick 86400
  65.         .msg $chan $nk That was your 3rd link, Try again tomorrow! - [Link] [24h BAN]
  66.         return
  67.       }
  68.       if (%permit_block_ [ $+ [ $nick ] ] == 2) {
  69.         unset %permit_block_ [ $+ [ $nick ] ]
  70.         unset %permit_ [ $+ [ $nick ] ]
  71.         .msg $chan /timeout $nick
  72.         .msg $chan $nk No links without permission. - [Link] [Timeout]
  73.         return
  74.       }
  75.     }
  76.   }
  77. }
  78. alias check_regchixy {
  79.   if (!$1) { return }
  80.   if (!$2) { return }
  81.   if ($me !ison $2) { return 0 }
  82.   if ($1 !ison $2) { return 0 }
  83.   var %f = regularschixy.txt
  84.   if (!$isfile(%f)) { return 0 }
  85.   if (!$lines(%f)) { return 0 }
  86.   var %r = $read(%f,nw,$1)
  87.   if (%r) { return 1 }
  88.   elseif (!%r) { return 0 }
  89. }
  90. alias check_modchixy {
  91.   if (!$1) { return }
  92.   if (!$2) { return }
  93.   if ($me !ison $2) { return 0 }
  94.   if ($1 !ison $2) { return 0 }
  95.   var %f = modschixy.txt
  96.   if (!$isfile(%f)) { return 0 }
  97.   if (!$lines(%f)) { return 0 }
  98.   var %r = $read(%f,nw,$1)
  99.   if (%r) { return 1 }
  100.   elseif (!%r) { return 0 }
  101. }
  102. alias check_subchixy {
  103.   if (!$1) { return }
  104.   if (!$2) { return }
  105.   if ($me !ison $2) { return 0 }
  106.   if ($1 !ison $2) { return 0 }
  107.   var %f = subs.txt
  108.   if (!$isfile(%f)) { return 0 }
  109.   if (!$lines(%f)) { return 0 }
  110.   var %r = $read(%f,nw,$1)
  111.   if (%r) { return 1 }
  112.   elseif (!%r) { return 0 }
  113. }
Add Comment
Please, Sign In to add comment