mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
@@ -80,7 +80,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/list_afks,
|
||||
/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,
|
||||
@@ -1027,4 +1028,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.")
|
||||
|
||||
@@ -408,6 +408,16 @@
|
||||
|
||||
Master.UpdateTickRate()
|
||||
|
||||
// Check total playercount
|
||||
var/playercount = 0
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
|
||||
if(playercount >= 150 && GLOB.panic_bunker_enabled == 0)
|
||||
GLOB.panic_bunker_enabled = 1
|
||||
message_admins("Panic bunker has been automatically enabled due to playercount surpassing 150")
|
||||
|
||||
/client/proc/is_connecting_from_localhost()
|
||||
var/localhost_addresses = list("127.0.0.1", "::1") // Adresses
|
||||
if(!isnull(address) && address in localhost_addresses)
|
||||
@@ -533,6 +543,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. Please try again later."
|
||||
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