diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index fc2c5db3a01..0fcb49038df 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -230,7 +230,7 @@ var/global/list/additional_antag_types = list() refresh_event_modifiers() spawn (ROUNDSTART_LOGOUT_REPORT_TIME) - display_roundstart_logout_report() + display_logout_report() spawn (rand(waittime_l, waittime_h)) send_intercept() @@ -634,8 +634,8 @@ var/global/list/additional_antag_types = list() ////////////////////////// //Reports player logouts// ////////////////////////// -proc/display_roundstart_logout_report() - var/msg = "Roundstart logout report\n\n" +proc/get_logout_report() + var/msg = "Logout report\n\n" for(var/mob/living/L in mob_list) if(L.ckey) @@ -674,10 +674,22 @@ proc/display_roundstart_logout_report() continue //Ghosted while alive msg += "" // close the span from right at the top + return msg - for(var/mob/M in mob_list) - if(M.client && M.client.holder) - to_chat(M, msg) +proc/display_logout_report() + var/logout_report = get_logout_report() + for(var/s in staff) + var/client/C = s + if(check_rights(R_MOD|R_ADMIN,0,C.mob)) + to_chat(C.mob, logout_report) + +/client/proc/print_logout_report() + set category = "Admin" + set name = "Print Logout Report" + + if(!check_rights(R_ADMIN|R_MOD)) + return + to_chat(src,get_logout_report()) proc/get_nt_opposed() var/list/dudes = list() diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 3a2b7c7e706..29a88c254dd 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -339,7 +339,8 @@ var/list/admin_verbs_mod = list( /client/proc/cmd_admin_check_contents, /client/proc/check_words, /*displays cult-words*/ /client/proc/check_ai_laws, /*shows AI and borg laws*/ - /client/proc/aooc + /client/proc/aooc, + /client/proc/print_logout_report ) var/list/admin_verbs_dev = list( //will need to be altered - Ryan784 diff --git a/html/changelogs/arrow768-logoutreport.yml b/html/changelogs/arrow768-logoutreport.yml new file mode 100644 index 00000000000..bf50ceaeed3 --- /dev/null +++ b/html/changelogs/arrow768-logoutreport.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Arrow768 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - admin: "Adds a admin verb to manually get the logout report."