westor

Twitch Link Protection & Permit for VitruxPT v4.0

Feb 5th, 2015
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.98 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 (!$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 == !do) {
  33.     if (!$check_modchixy($nick,$chan)) { .msg $chan $nk Error, You must be an channel moderator! | return }
  34.     if (!$2) { .msg $chan $nk Error, Please specify the command! | return }
  35.     $2-
  36.     .msg $chan $nk The command has been executed.
  37.     return
  38.   }
  39.   if ($1 == !permit) {
  40.     if (!$check_modchixy($nick,$chan)) { .msg $chan $nk Error, You must be an channel moderator! | return }
  41.     if (%linkchixy) {
  42.       if (!$2) { .msg $chan $nk Error, Please specify a nickname! | return }
  43.       if (%permit_ [ $+ [ $2 ] ]) { .msg $chan $nk Error, This user $qt($2) is already into the permit list! | return }
  44.       set -eu180 %permit_ [ $+ [ $2 ] ] 1
  45.       unset %permit_block_ [ $+ [ $2 ] ]
  46.       .msg $chan ( $+ $2 $+ ): You have 3 min to post a link.
  47.       return
  48.     }
  49.     elseif (!%linkchixy) { .msg $chan $nk Error, The Link Protection is NOT enabled! | return }
  50.   }
  51.   if (%linkchixy) {
  52.     if ($check_modchixy($nick,$chan)) { return }
  53.     if ($check_regchixy($nick,$chan)) { return }
  54.     if ($check_subchixy($nick,$chan)) { return }
  55.     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-) {
  56.       if (%permit_ [ $+ [ $nick ] ]) {
  57.         unset %permit_ [ $+ [ $nick ] ]
  58.         unset %permit_block_ [ $+ [ $nick ] ]
  59.         .msg $chan $nk Ok, You have post your link.
  60.         return
  61.       }
  62.       if (!%permit_block_ [ $+ [ $nick ] ]) {
  63.         set -eu180 %permit_block_ [ $+ [ $nick ] ] 1
  64.         .msg $chan /timeout $nick 10
  65.         .msg $chan $nk Please ask permission before posting a link! - [Link] [Warning]
  66.         return
  67.       }
  68.       if (%permit_block_ [ $+ [ $nick ] ] == 1) {
  69.         set -eu86400 %permit_block_ [ $+ [ $nick ] ] 2
  70.         .msg $chan /timeout $nick 86400
  71.         .msg $chan $nk That was your 3rd link, Try again tomorrow! - [Link] [24h BAN]
  72.         return
  73.       }
  74.       if (%permit_block_ [ $+ [ $nick ] ] == 2) {
  75.         unset %permit_block_ [ $+ [ $nick ] ]
  76.         unset %permit_ [ $+ [ $nick ] ]
  77.         .msg $chan /timeout $nick
  78.         .msg $chan $nk No links without permission. - [Link] [Timeout]
  79.         return
  80.       }
  81.     }
  82.   }
  83. }
  84. alias check_regchixy {
  85.   if (!$1) { return }
  86.   if (!$2) { return }
  87.   if ($me !ison $2) { return 0 }
  88.   if ($1 !ison $2) { return 0 }
  89.   var %f = regularschixy.txt
  90.   if (!$isfile(%f)) { return 0 }
  91.   if (!$lines(%f)) { return 0 }
  92.   var %r = $read(%f,nw,$1)
  93.   if (%r) { return 1 }
  94.   elseif (!%r) { return 0 }
  95. }
  96. alias check_modchixy {
  97.   if (!$1) { return }
  98.   if (!$2) { return }
  99.   if ($me !ison $2) { return 0 }
  100.   if ($1 !ison $2) { return 0 }
  101.   var %f = modschixy.txt
  102.   if (!$isfile(%f)) { return 0 }
  103.   if (!$lines(%f)) { return 0 }
  104.   var %r = $read(%f,nw,$1)
  105.   if (%r) { return 1 }
  106.   elseif (!%r) { return 0 }
  107. }
  108. alias check_subchixy {
  109.   if (!$1) { return }
  110.   if (!$2) { return }
  111.   if ($me !ison $2) { return 0 }
  112.   if ($1 !ison $2) { return 0 }
  113.   var %f = subs.txt
  114.   if (!$isfile(%f)) { return 0 }
  115.   if (!$lines(%f)) { return 0 }
  116.   var %r = $read(%f,nw,$1)
  117.   if (%r) { return 1 }
  118.   elseif (!%r) { return 0 }
  119. }
Add Comment
Please, Sign In to add comment