Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
#Author: NotABot
options:
#set this to yes or no if you want to kick the VPN user. Not sure why you would disable this, though...
kick: true
#changes the main admin command
command: antivpn
#changes the main admin permission
permission: antivpn.admin
#Permission to message staff if a player was kicked
permission2: antivpn.staff
#list of databases used, set to false to disable them
iphub: true
stopforumspam: true
on join:
if {AntiVPN::VPNBypass::%player%} is set:
stop
set {_ip} to "%ip of player%"
if {AntiVPN::VPNBypassIP::%ip of player%} is set:
stop
if {@iphub} is true:
$ thread
set {_info} to text from "http://legacy.iphub.info/api.php?ip=%{_ip}%&showtype=4"
set {_info::*} to {_info} split at ",""proxy"":"
set {_info} to {_info::2}
replace all "}" with "" in {_info}
if {_info} is "1":
if {@kick} is true:
kick player due to "&3You might be using a vpn!%nl%&3%nl%Is this an error? Contact a staff member!"
set join message to "" #!Due to limitations in the on connect event, I can not use it. This just makes sure chat isn't spammed with someone joining over and over. Fun fact: This still exists as of 2/14/17.
loop all players:
if loop-player has permission "{@permission2}":
send "&c%player%&a was kicked for using a VPN!" to loop-player
stop
if {@stopforumspam} is true:
$ thread
set {_info} to text from "http://api.stopforumspam.org/api?ip=%{_ip}%"
set {_info::*} to {_info} split at "<appears>"
set {_info} to {_info::2}
set {_info::*} to {_info} split at "</appears>"
set {_info} to {_info::1}
if {_info} is "yes":
if {@kick} is true:
kick player due to "&3You might be using a vpn!%nl%&3%nl%Is this an error? Contact a staff member!"
set join message to "" #!Due to limitations in the on connect event, I can not use it. This just makes sure chat isn't spammed with someone joining over and over. Fun fact: This still exists as of 2/14/17.
loop all players:
if loop-player has permission "{@permission2}":
send "&c%player%&a was kicked for using a VPN!" to loop-player
command /{@command} [<text>] [<text>]:
permission: {@permission}
trigger:
if arg-1 is "add":
if arg-2 is set:
if {AntiVPN::VPNBypass::%arg-2%} is not set:
set {AntiVPN::VPNBypass::%arg-2%} to true
send "&aAdded &c%arg-2%&a to VPN Bypass list!"
else:
send "&aThat player is already on the VPN Bypass list!"
else:
send "&cUsage: &a/{@command} add <player>"
else if arg-1 is "addip":
if arg-2 is set:
if {AntiVPN::VPNBypassIP::%arg-2%} is not set:
set {AntiVPN::VPNBypassIP::%arg-2%} to true
send "&aAdded &c%arg-2%&a to VPN Bypass IP list!"
else:
send "&aThat IP is already on the VPN Bypass list!"
else:
send "&cUsage: &a/{@command} addip <ip>"
else if arg-1 is "remove":
if arg-2 is set:
if {AntiVPN::VPNBypass::%arg-2%} is set:
delete {AntiVPN::VPNBypass::%arg-2%}
send "&aRemoved &c%arg-2%&a from VPN Bypass list!"
else:
send "&aThat player is not on the VPN Bypass list!"
else:
send "&cUsage: &a/{@command} remove <player>"
else if arg-1 is "removeip":
if arg-2 is set:
if {AntiVPN::VPNBypassIP::%arg-2%} is set:
delete {AntiVPN::VPNBypassIP::%arg-2%}
send "&aRemoved &c%arg-2%&a from VPN Bypass IP list!"
else:
send "&aThat player is not on the VPN Bypass IP list!"
else:
send "&cUsage: &a/{@command} removeip <ip>"
else if arg-1 is "list":
if arg-2 is not set:
if (size of {AntiVPN::VPNBypass::*}) is greater than 8:
loop {AntiVPN::VPNBypass::*}:
add "%loop-index%" to {_Temp::*}
send "&aVPNBypass List:"
send "&a%{_Temp::*}%"
else:
send "&aVPNBypass List:"
loop {AntiVPN::VPNBypass::*}:
send "&a%loop-index%"
else if arg-2 is "ip":
if (size of {AntiVPN::VPNBypassIP::*}) is greater than 8:
loop {AntiVPN::VPNBypassIP::*}:
add "%loop-index%" to {_Temp::*}
send "&aVPNBypass IP List:"
send "&a%{_Temp::*}%"
else:
send "&aVPNBypass IP List:"
loop {AntiVPN::VPNBypassIP::*}:
send "&a%loop-index%"
else:
send "&a[] &2= &aOptional &2| &a<> &2= &aRequired"
send "&cUsage: &a/{@command} add <player> &2| &aAdds a players to the bypass list"
send "&cUsage: &a/{@command} remove <player> &2| &aRemoves a player from the bypass list"
send "&cUsage: &a/{@command} addip <ip> &2| &aAdds an IP to the bypass list"
send "&cUsage: &a/{@command} removeip <ip> &2| &aRemoves an IP from the bypass list"
send "&cUsage: &a/{@command} list [ip] &2| &aLists users [IPs] on the bypass list"