Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Ports whitelisting from Ratwood #1258

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ GLOBAL_PROTECT(admin_verbs_default)
/client/proc/delete_player_book,
/client/proc/amend_player_book,
/client/proc/pull_book_file_names,
/client/proc/adminwho
/client/proc/adminwho,
/client/proc/bunker_bypass
)
GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
GLOBAL_PROTECT(admin_verbs_admin)
Expand Down
18 changes: 18 additions & 0 deletions code/modules/admin/bunker_bypass.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
GLOBAL_LIST_EMPTY(bunker_bypasses)

/client/proc/bunker_bypass()
set category = "Admin"
set name = "Add Bunker Bypass"

var/selection = input("Who would you like to let in?", "CKEY", "") as text|null
if(selection)
add_bunker_bypass(selection, ckey)

/proc/add_bunker_bypass(target_ckey, admin_ckey = "SYSTEM")
if(!target_ckey)
return

target_ckey = ckey(target_ckey)
GLOB.bunker_bypasses |= target_ckey
message_admins("BUNKER BYPASS: Added [target_ckey] to the bypass list[admin_ckey? " by [admin_ckey]":""]")
log_admin("BUNKER BYPASS: Added [target_ckey] to the bypass list[admin_ckey? " by [admin_ckey]":""]")
3 changes: 2 additions & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,8 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
qdel(query_client_in_db)
return
if(!query_client_in_db.NextRow())
if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey])
// if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey])
if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey] && !(ckey in GLOB.bunker_bypasses))
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
to_chat(src, CONFIG_GET(string/panic_bunker_message))
Expand Down
1 change: 1 addition & 0 deletions roguetown.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,7 @@
#include "code\modules\admin\adminmenu.dm"
#include "code\modules\admin\antag_panel.dm"
#include "code\modules\admin\blacklist.dm"
#include "code\modules\admin\bunker_bypass.dm"
#include "code\modules\admin\chat_commands.dm"
#include "code\modules\admin\check_antagonists.dm"
#include "code\modules\admin\create_mob.dm"
Expand Down
Loading