Fixed localhost autoadmin for the re-admin verb (#18897)

* Fixed localhost autoadmin for the re-admin verb

* Update code/modules/client/client_procs.dm

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
DamianX
2022-09-08 23:51:39 -05:00
committed by GitHub
co-authored by AffectedArc07
parent c5b32512ab
commit ed9e232af5
2 changed files with 49 additions and 46 deletions
+4 -3
View File
@@ -254,9 +254,7 @@
GLOB.directory[ckey] = src
//Admin Authorisation
// Automatically makes localhost connection an admin
if(GLOB.configuration.admin.enable_localhost_autoadmin)
if(is_connecting_from_localhost())
new /datum/admins("!LOCALHOST!", R_HOST, ckey) // Makes localhost rank
try_localhost_autoadmin()
holder = GLOB.admin_datums[ckey]
if(holder)
@@ -1184,6 +1182,9 @@
else
SSambience.ambience_listening_clients -= src
/client/proc/try_localhost_autoadmin()
if(GLOB.configuration.admin.enable_localhost_autoadmin && is_connecting_from_localhost())
return new /datum/admins("!LOCALHOST!", R_HOST, ckey)
// Verb scoped to the client level so its ALWAYS available
/client/verb/open_tos()