Files
VOREStation/code/modules/mob/logout.dm
Selis 7a7ae89713 [MAJOR CHANGE] Admin rank datum (#17133)
* Admin ranks update

* Permissions fix

* One missing thing

* Further rework to make database also fully work

* Adds admin rank bitflag calculator to tools

* ZA WARUDO

---------

Co-authored-by: C.L. <killer65311@gmail.com>
2025-03-06 01:38:19 +01:00

18 lines
729 B
Plaintext

/mob/Logout()
SStgui.on_logout(src) // Cleanup any TGUIs the user has open
player_list -= src
disconnect_time = world.realtime //VOREStation Addition: logging when we disappear.
update_client_z(null)
log_access_out(src)
unset_machine()
if(GLOB.admin_datums[src.ckey])
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
var/admins_number = GLOB.admins.len
message_admins("Admin logout: [key_name(src)]")
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
send2adminirc("[key_name(src)] logged out - no more admins online.")
..()
return 1