mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 01:52:15 +00:00
Merges the NanoUI subsystem with Nanomanager, as well as cleans up some nanomanager code. Most of the files in this commit are changed as a result of removing the nanomanager global in favor of the SSnanoui global.
23 lines
1022 B
Plaintext
23 lines
1022 B
Plaintext
/mob/Logout()
|
|
SSnanoui.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
|
|
player_list -= src
|
|
log_access("Logout: [key_name(src)]",ckey=key_name(src))
|
|
if(admin_datums[src.ckey])
|
|
if (SSticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
|
|
var/admins_number = 0
|
|
var/admins_number_afk = 0
|
|
for (var/client/C)
|
|
if (C.holder && (C.holder.rights & (R_MOD|R_ADMIN)))
|
|
admins_number++
|
|
if (C.is_afk())
|
|
admins_number_afk++
|
|
|
|
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.
|
|
discord_bot.send_to_admins("@here [key_name(src)] logged out - no more admins online.")
|
|
else if ((admins_number - admins_number_afk) <= 0)
|
|
discord_bot.send_to_admins("[key_name(src)] logged out - only AFK admins ([admins_number_afk]) are online.")
|
|
..()
|
|
return 1
|