westor

Country Scan And Ban for Makis v1.6

Nov 3rd, 2019
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.45 KB | None | 0 0
  1. alias -l channel { return #gayhellas }
  2. alias -l ban_delay { return 10800 }
  3.  
  4. ON ME:*:JOIN:$($channel): { mode $chan b | mode $chan e | mode $chan I }
  5.  
  6. ON @!*:JOIN:$($channel): {
  7.   var %not_hosts = 109.169.31.4 107.161.19.53 107.161.19.109
  8.  
  9.   if (*!*@ $+ $site isexcept $chan) || ($nick $+ !*@* isexcept $chan) { return }
  10.   if (o !isincs $usermode) || (*.gr iswm $site) || (*kiwiirc* iswm $site) || ($istok(%not_hosts,$site,32)) || (*.cosmote.net iswm $site) { return }
  11.  
  12.   if (*HIDE-IP* iswm $site) || (*.IP iswm $site) { set -e %userip_nicks $addtok(%userip_nicks,$nick,32) | userip $nick | return }
  13.  
  14.   .timer[VPN_ $+ $nick $+ _CHECK] 1 $rand(1,10) vpn_check $nick $site
  15. }
  16.  
  17. raw 340:*: {
  18.   var %n = $gettok($2,1,61)
  19.   var %h = $gettok($2,2,64)
  20.  
  21.   if (%n) && (%h) && ($istok(%userip_nicks,%n,32)) {
  22.     haltdef
  23.  
  24.     set -e %userip_nicks $remtok(%userip_nicks,%n,1,32)
  25.  
  26.     .timer[VPN_ $+ %n $+ _CHECK] 1 $rand(1,10) vpn_check %n %h
  27.   }
  28. }
  29.  
  30. raw 367:*: { if ($2 == $channel) { haltdef } }
  31. raw 368:*: { if ($2 == $channel) { haltdef } }
  32. raw 346:*: { if ($2 == $channel) { haltdef } }
  33. raw 347:*: { if ($2 == $channel) { haltdef } }
  34. raw 348:*: { if ($2 == $channel) { haltdef } }
  35. raw 349:*: { if ($2 == $channel) { haltdef } }
  36.  
  37. alias -l bold { return $+($chr(2),$1-,$chr(2)) }
  38. alias -l under { return $+($chr(31),$1-,$chr(31)) }
  39.  
  40. alias -l vpn_check {
  41.   if (!$1) && (!$2) && ($me !ison $channel) && ($me !isop $channel) && ($1 !ison $channel) { return }
  42.  
  43.   var %s = $iif($ban_delay,$v1,10800)
  44.  
  45.   var %v1 = SCAN_VPN_ $+ $rand(1,1000000000)
  46.  
  47.   JSONOpen -ud %v1 http://ip-api.com/json/ $+ $2
  48.   if ($jsonerror) { goto second }
  49.  
  50.   var %country = $json(%v1,countryCode).value
  51.  
  52.   if (%country) && (%country !== GR) { ban -ku $+ %s $channel $1 2 Your IP/Host ( $+ $bold($2) $+ ) Connecting From: $bold(%country) --> $under(Open Proxy) $+ / $+ $under(VPN) $+ / $+ $under(TOR Exit) - Rules: $under(http://tiny.cc/gayhellas_rules) - Bantime: $bold($duration(%s)) }
  53.  
  54.   return
  55.  
  56.   :second
  57.  
  58.   var %v2 = SCAN_VPN2_ $+ $rand(1,1000000000)
  59.  
  60.   JSONOpen -ud %v2 https://ipinfo.io/ $+ $2 $+ /json?token=7247b6c26b2413
  61.   if ($jsonerror) { return }
  62.  
  63.   var %country = $json(%v2,country).value
  64.  
  65.   if (%country) && (%country !== GR) { ban -ku $+ %s $channel $1 2 Your IP/Host ( $+ $bold($2) $+ ) Connecting From: $bold(%country) ---> $under(Open Proxy) $+ / $+ $under(VPN) $+ / $+ $under(TOR Exit) - Rules: $under(http://tiny.cc/gayhellas_rules) - Bantime: $bold($duration(%s)) }
  66. }
Add Comment
Please, Sign In to add comment