Files
Paradise/code/modules/mob/logout.dm
AffectedArc07 58aa86cb9f TGUI-V3 (#13310)
* I need that gitignore file

* Temp Commit - DOES NOT COMPILE

* THE SHIT WORKS

* Readme change

* Disposal Unit --> TGUI

* mmmm yes CI which may not actually work

* New GitIgnore

* ITS TGUI-NEXT BABY

* Doc update

* CI tweak

* Chmod

* And again

* *sigh*

* Lets appreciate the irony of me failing CI stages

* 0/1 --> True/False

* Fixes some update nonsense

* CI Update

* Lets try this

* What about this maybe

* NVM is hurting me

* I swear to god

* A little bit of validation in my life

* V3 BABYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

* Fixes

* Fixes NaN appearing for a few frames when UIs open

* Fixes + Crew Monitor

* Corn + Steel + Mochi Fixes

* Forgot this

* Fixes from stylemistake

* Code Change

* Adds logout proc

* Offline implications + Resizeable crew monitor

* Change locate() to locateUID()

* Change div --> box
2020-06-30 03:51:36 -04:00

23 lines
1.1 KiB
Plaintext

/mob/Logout()
SSnanoui.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
SStgui.on_logout(src) // Cleanup any TGUIs the user has open
unset_machine()
GLOB.player_list -= src
log_access_out(src)
create_attack_log("<font color='red'>Logged out at [atom_loc_line(get_turf(src))]</font>")
create_log(MISC_LOG, "Logged out")
// `holder` is nil'd out by now, so we check the `admin_datums` array directly
//Only report this stuff if we are currently playing.
if(GLOB.admin_datums[ckey] && SSticker && SSticker.current_state == GAME_STATE_PLAYING)
var/datum/admins/temp_admin = GLOB.admin_datums[ckey]
// Triggers on people with banhammer power only - no mentors tripping the alarm
if(temp_admin.rights & R_BAN)
message_admins("Admin logout: [key_name_admin(src)]")
var/list/admincounter = staff_countup(R_BAN)
if(admincounter[1] == 0) // No active admins
send2irc(config.admin_notify_irc, "[key_name(src)] logged out - No active admins, [admincounter[2]] non-admin staff, [admincounter[3]] inactive staff.")
..()
update_morgue()
return 1