westor

Twitch Link Protection & Permit for VitruxPT v5.0

Feb 5th, 2015
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.00 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 == !do) {
  33.     if ($nick !isop $chan) && (!$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 ($nick !isop $chan) && (!$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 ($nick isop $chan) { return }
  53.     if ($check_modchixy($nick,$chan)) { return }
  54.     if ($check_regchixy($nick,$chan)) { return }
  55.     if ($check_subchixy($nick,$chan)) { return }
  56.     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-) {
  57.       if (%permit_ [ $+ [ $nick ] ]) {
  58.         unset %permit_ [ $+ [ $nick ] ]
  59.         unset %permit_block_ [ $+ [ $nick ] ]
  60.         .msg $chan $nk Ok, You have post your link.
  61.         return
  62.       }
  63.       if (!%permit_block_ [ $+ [ $nick ] ]) {
  64.         set -eu180 %permit_block_ [ $+ [ $nick ] ] 1
  65.         .msg $chan /timeout $nick 10
  66.         .msg $chan $nk Please ask permittion before posting a link! - [Link] [Warning]
  67.         return
  68.       }
  69.       if (%permit_block_ [ $+ [ $nick ] ] == 1) {
  70.         set -eu180 %permit_block_ [ $+ [ $nick ] ] 2
  71.         .msg $chan /timeout $nick 180
  72.         .msg $chan $nk That was your 2rd link, ask for permittion now! - [Link] [10m BAN]
  73.         return
  74.       }
  75.       if (%permit_block_ [ $+ [ $nick ] ] == 2) {
  76.         unset %permit_block_ [ $+ [ $nick ] ]
  77.         unset %permit_ [ $+ [ $nick ] ]
  78.         .msg $chan /timeout $nick 86400
  79.         .msg $chan $nk That was your 3rd link, Try again tomorrow! - [Link] [24h BAN]
  80.         return
  81.       }
  82.     }
  83.   }
  84. }
  85. alias check_regchixy {
  86.   if (!$1) { return }
  87.   if (!$2) { return }
  88.   if ($me !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.   var %f = modschixy.txt
  101.   if (!$isfile(%f)) { return 0 }
  102.   if (!$lines(%f)) { return 0 }
  103.   var %r = $read(%f,nw,$1)
  104.   if (%r) { return 1 }
  105.   elseif (!%r) { return 0 }
  106. }
  107. alias check_subchixy {
  108.   if (!$1) { return }
  109.   if (!$2) { return }
  110.   if ($me !ison $2) { return 0 }
  111.   var %f = subs.txt
  112.   if (!$isfile(%f)) { return 0 }
  113.   if (!$lines(%f)) { return 0 }
  114.   var %r = $read(%f,nw,$1)
  115.   if (%r) { return 1 }
  116.   elseif (!%r) { return 0 }
  117. }
Add Comment
Please, Sign In to add comment