mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Panic Bunker
This commit is contained in:
@@ -88,4 +88,6 @@ var/copier_items_printed_logged = FALSE
|
||||
|
||||
GLOBAL_VAR(map_name) // Self explanatory
|
||||
|
||||
var/global/datum/datacore/data_core = null // Station datacore, manifest, etc
|
||||
var/global/datum/datacore/data_core = null // Station datacore, manifest, etc
|
||||
|
||||
GLOBAL_VAR_INIT(panic_bunker_enabled, 0) // Is the panic bunker enabled
|
||||
@@ -79,7 +79,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/list_ssds,
|
||||
/client/proc/cmd_admin_headset_message,
|
||||
/client/proc/spawn_floor_cluwne,
|
||||
/client/proc/show_discord_duplicates,
|
||||
/client/proc/show_discord_duplicates, // This needs removing at some point, ingame discord linking got removed in #11359
|
||||
/client/proc/toggle_panic_bunker
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
@@ -1026,4 +1027,17 @@ var/list/admin_verbs_ticket = list(
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
holder.discord_duplicates()
|
||||
holder.discord_duplicates()
|
||||
|
||||
/client/proc/toggle_panic_bunker()
|
||||
set name = "Toggle Panic Bunker"
|
||||
set category = "Admin"
|
||||
set desc = "Disables new players connecting."
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
GLOB.panic_bunker_enabled = !GLOB.panic_bunker_enabled
|
||||
|
||||
log_admin("[key_name(usr)] has [GLOB.panic_bunker_enabled ? "activated" : "deactivated"] the panic bunker.")
|
||||
message_admins("[key_name_admin(usr)] has [GLOB.panic_bunker_enabled ? "activated" : "deactivated"] the panic bunker.")
|
||||
|
||||
@@ -537,6 +537,14 @@
|
||||
message_admins("SQL ERROR during log_client_to_db (update). Error : \[[err]\]\n")
|
||||
else
|
||||
//New player!! Need to insert all the stuff
|
||||
|
||||
// Check new peeps for panic bunker
|
||||
if(GLOB.panic_bunker_enabled)
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
|
||||
src << "Sorry but the server is currently not accepting connections from never before seen players."
|
||||
del(src)
|
||||
return // Dont insert or they can just go in again
|
||||
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
if(!query_insert.Execute())
|
||||
var/err = query_insert.ErrorMsg()
|
||||
|
||||
Reference in New Issue
Block a user