mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
you ahelp for vpn now
because some people apparently need em
This commit is contained in:
@@ -89,6 +89,8 @@ GLOBAL_PROTECT(admin_verbs_admin)
|
||||
/client/proc/revokebunkerbypass, //CIT
|
||||
/client/proc/adddiscordbypass, //SPLURT
|
||||
/client/proc/revokediscordbypass, //SPLURT
|
||||
/client/proc/addvpnbypass, //SPLURT
|
||||
/client/proc/revokevpnbypass, //SPLURT
|
||||
/datum/admins/proc/open_borgopanel
|
||||
)
|
||||
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/DB_ban_panel, /client/proc/stickybanpanel))
|
||||
@@ -149,6 +151,7 @@ GLOBAL_PROTECT(admin_verbs_server)
|
||||
/client/proc/adminchangemap,
|
||||
/client/proc/panicbunker,
|
||||
/client/proc/discordbunker, // SPLURT
|
||||
/client/proc/vpnbunker, //SPLURT
|
||||
// /client/proc/toggle_interviews,
|
||||
/client/proc/toggle_hub,
|
||||
/client/proc/toggle_cdn
|
||||
@@ -279,10 +282,13 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/panicbunker,
|
||||
/client/proc/discordbunker, // SPLURT
|
||||
/client/proc/vpnbunker, // SPLURT
|
||||
/client/proc/addbunkerbypass, //CIT
|
||||
/client/proc/revokebunkerbypass, //CIT
|
||||
/client/proc/adddiscordbypass, //SPLURT
|
||||
/client/proc/revokediscordbypass, //SPLURT
|
||||
/client/proc/addvpnbypass, //SPLURT
|
||||
/client/proc/revokevpnbypass, //SPLURT
|
||||
// /client/proc/toggle_interviews,
|
||||
/client/proc/admin_change_sec_level,
|
||||
/client/proc/toggle_nuke,
|
||||
|
||||
@@ -7,3 +7,9 @@
|
||||
# Uncomment to kick players who are probably trying to connect using a vpn
|
||||
# Keep in mind this depends on your ipintel configuration and can potentially kick players not actually using a vpn
|
||||
#KICK_VPN
|
||||
|
||||
# VPN bypass ckeys
|
||||
## Use these if you activate the option above but have some people that for one reason or another should be allowed to bypass it ##
|
||||
#VPN_BYPASS test_ckey1
|
||||
#VPN_BYPASS test_ckey2
|
||||
#VPN_BYPASS test_ckey3
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
/datum/config_entry/flag/need_discord_to_join
|
||||
|
||||
/datum/config_entry/flag/kick_vpn
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/vpn_bypass
|
||||
postload_required = TRUE
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/vpn_bypass/OnPostload()
|
||||
var/list/new_entries = list()
|
||||
for(var/key in config_entry_value)
|
||||
new_entries[ckey(key)] = world.realtime
|
||||
config_entry_value = new_entries
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/vpn_bypass/proc/add_bypass(ckeytobypass)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
config_entry_value |= ckey(ckeytobypass)
|
||||
config_entry_value[ckey(ckeytobypass)] = world.realtime
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/vpn_bypass/proc/rev_bypass(ckeytobypass)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
config_entry_value -= ckey(ckeytobypass)
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
log_admin("[key_name(usr)] has toggled the Discord Bunker, it is now [new_dbun ? "on" : "off"]")
|
||||
message_admins("[key_name_admin(usr)] has toggled the Discord Bunker, it is now [new_dbun ? "enabled" : "disabled"].")
|
||||
SSblackbox.record_feedback("nested tally", "discord_toggle", 1, list("Toggle Panic Bunker", "[new_dbun ? "Enabled" : "Disabled"]"))
|
||||
send2adminchat("Discord Bunker", "[key_name(usr)] has toggled the Panic Bunker, it is now [new_dbun ? "enabled" : "disabled"].")
|
||||
SSblackbox.record_feedback("nested tally", "discord_toggle", 1, list("Toggle Discord Bunker", "[new_dbun ? "Enabled" : "Disabled"]"))
|
||||
send2adminchat("Discord Bunker", "[key_name(usr)] has toggled the Discord Bunker, it is now [new_dbun ? "enabled" : "disabled"].")
|
||||
|
||||
/client/proc/adddiscordbypass(ckeytobypass as text) // In case someone's too lazy to verify on discord
|
||||
set category = "Special Verbs"
|
||||
|
||||
37
modular_splurt/code/modules/admin/verbs/vpnbunker.dm
Normal file
37
modular_splurt/code/modules/admin/verbs/vpnbunker.dm
Normal file
@@ -0,0 +1,37 @@
|
||||
/client/proc/vpnbunker()
|
||||
set category = "Server"
|
||||
set name = "Toggle VPN Blocker"
|
||||
|
||||
var/new_vpnbun = !CONFIG_GET(flag/kick_vpn)
|
||||
CONFIG_SET(flag/kick_vpn, new_vpnbun)
|
||||
|
||||
log_admin("[key_name(usr)] has toggled the VPN Blocker, it is now [new_vpnbun ? "on" : "off"]")
|
||||
message_admins("[key_name_admin(usr)] has toggled the VPN Blocker, it is now [new_vpnbun ? "enabled" : "disabled"].")
|
||||
SSblackbox.record_feedback("nested tally", "vpn_toggle", 1, list("Toggle VPN Blocker", "[new_vpnbun ? "Enabled" : "Disabled"]"))
|
||||
send2adminchat("VPN Blocker", "[key_name(usr)] has toggled the VPN Bunker, it is now [new_vpnbun ? "enabled" : "disabled"].")
|
||||
|
||||
/client/proc/addvpnbypass(ckeytobypass as text)
|
||||
set category = "Special Verbs"
|
||||
set name = "Add VPN Bypass"
|
||||
set desc = "Allows a given ckey to connect through the VPN Blocker."
|
||||
if(!CONFIG_GET(flag/kick_vpn))
|
||||
to_chat(usr, span_adminnotice("VPN Blocker is currently off!"))
|
||||
|
||||
var/datum/config_entry/multi_keyed_flag/vpn_bypass/bypasses = CONFIG_GET_ENTRY(multi_keyed_flag/vpn_bypass)
|
||||
bypasses.add_bypass(ckeytobypass)
|
||||
log_admin("[key_name(usr)] has added [ckeytobypass] to the current round's VPN bypass list.")
|
||||
message_admins("[key_name_admin(usr)] has added [ckeytobypass] to the current round's VPN bypass list.")
|
||||
send2adminchat("VPN Blocker", "[key_name(usr)] has added [ckeytobypass] to the current round's VPN bypass list.")
|
||||
|
||||
/client/proc/revokevpnbypass(ckeytobypass as text)
|
||||
set category = "Special Verbs"
|
||||
set name = "Revoke VPN Bypass"
|
||||
set desc = "Removes a ckey from the VPN Blocker bypass list."
|
||||
if(!CONFIG_GET(flag/kick_vpn))
|
||||
to_chat(usr, span_adminnotice("VPN Blocker is currently off!"))
|
||||
|
||||
var/datum/config_entry/multi_keyed_flag/vpn_bypass/bypasses = CONFIG_GET_ENTRY(multi_keyed_flag/vpn_bypass)
|
||||
bypasses.rev_bypass(ckeytobypass)
|
||||
log_admin("[key_name(usr)] has removed [ckeytobypass] from the current round's VPN bypass list.")
|
||||
message_admins("[key_name_admin(usr)] has removed [ckeytobypass] from the current round's VPN bypass list.")
|
||||
send2adminchat("VPN Blocker", "[key_name(usr)] has removed [ckeytobypass] from the current round's VPN bypass list.")
|
||||
@@ -3,9 +3,17 @@
|
||||
if(!(ip_intel != initial(ip_intel) && ip_intel >= CONFIG_GET(number/ipintel_rating_bad)))
|
||||
uses_vpn = FALSE
|
||||
return .
|
||||
uses_vpn = TRUE
|
||||
|
||||
uses_vpn = TRUE //Puts the vpn flag on the player playtimes
|
||||
|
||||
//Kicks them automatically if 100% sure and they're not whitelisted
|
||||
if(!CONFIG_GET(flag/kick_vpn) || ip_intel < 1)
|
||||
return .
|
||||
var/datum/config_entry/multi_keyed_flag/vpn_bypass/whitelist = CONFIG_GET_ENTRY(multi_keyed_flag/vpn_bypass)
|
||||
if(ckey(ckey) in whitelist.config_entry_value)
|
||||
log_admin("[key_name(src)] was allowed to join although they're using a vpn")
|
||||
return .
|
||||
|
||||
to_chat(src, span_danger("You have been kicked from the server because your IP has been flagged as a VPN. \
|
||||
Please turn it off in order to connect or contact staff in case this is an error."))
|
||||
var/logg = "[key_name(src)] kicked for failing the vpn check."
|
||||
|
||||
@@ -4399,6 +4399,7 @@
|
||||
#include "modular_splurt\code\modules\admin\verbs\one_click_antag.dm"
|
||||
#include "modular_splurt\code\modules\admin\verbs\pray.dm"
|
||||
#include "modular_splurt\code\modules\admin\verbs\randomverbs.dm"
|
||||
#include "modular_splurt\code\modules\admin\verbs\vpnbunker.dm"
|
||||
#include "modular_splurt\code\modules\antagonists\_common\antag_spawner.dm"
|
||||
#include "modular_splurt\code\modules\antagonists\bloodsucker\levelup.dm"
|
||||
#include "modular_splurt\code\modules\antagonists\ert_cleanup\ert_cleanup.dm"
|
||||
|
||||
Reference in New Issue
Block a user