Add privileged that allows IP address checks to be ignored for certain players in "kick" mode.

master
red-001 2018-02-16 23:49:06 +00:00
parent 3233c74c53
commit 4a7833f700
No known key found for this signature in database
GPG Key ID: 0CBE03CD90F44222
1 changed files with 5 additions and 0 deletions

View File

@ -98,6 +98,9 @@ elseif block_type == "activation" then
elseif block_type == "kick" then
core.register_on_joinplayer(function(player)
local name = player:get_player_name()
if core.check_player_privs(name, {bypass_ip_check=true}) then
return
end
block_vps.get_ip_info(core.get_player_ip(name), function(ip, info)
if info and info.is_blocked then
log_block(name, ip, info.isp, info.api, true)
@ -107,6 +110,8 @@ elseif block_type == "kick" then
end)
end
core.register_privilege("bypass_ip_check", "Stops the users IP from being check on join by block_vps")
core.register_chatcommand("get_ip_info", {
params = "<ip_address>",
description = "Display IP address information",