diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index ff6f803f5f0..623225d68c3 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -165,6 +165,9 @@ var/autoconvert_notes = 0 //if all connecting player's notes should attempt to be converted to the database + var/announce_admin_logout = 1 + var/announce_admin_login = 0 + /datum/configuration/New() var/list/L = typesof(/datum/game_mode) - /datum/game_mode for(var/T in L) @@ -347,6 +350,10 @@ world.log = newlog if("autoconvert_notes") config.autoconvert_notes = 1 + if("announce_admin_logout") + config.announce_admin_logout = 1 + if("announce_admin_login") + config.announce_admin_login = 1 else diary << "Unknown setting in configuration: '[name]'" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index b4142a70058..abe9be3cea6 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -810,19 +810,13 @@ var/global/floorIsLava = 0 return 1 -/client/proc/adminGreet() - if(ticker && ticker.current_state == GAME_STATE_PLAYING) - var/string = pick( - "I welcome you to the server [key]!", - "Happy to see you [key]!", - "Ah, [key] logged, say hello!", - "The server welcomes you [key]!", - "Exceptional! [key] joined us, what an honour!", - "Another amazing day, because [key] logged, say hi!", - "Did anyone see? [key] logged, welcome!", - "Monday to sunday, the server warmly welcomes you [key]!", - "It's a pleasure to see you [key], greetings!", - "Not a bad day if [key] joins, welcome, welcome!", - "Surely it's nice to see you [key], have a heartly welcome!") - //I really do +/client/proc/adminGreet(logout) + if(ticker && ticker.current_state == GAME_STATE_PLAYING && config && config.announce_admin_login) + var/string + if(logout) + string = pick( + "Admin logout: [key_name(src)]") + else + string = pick( + "Admin login: [key_name(src)]") message_admins("[string]") \ No newline at end of file diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 1892a98a99a..9afd2e30144 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -5,8 +5,7 @@ if(admin_datums[src.ckey]) if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing. var/admins_number = admins.len - - message_admins("Admin logout: [key_name(src)]") + client.adminGreet(1) 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. var/cheesy_message = pick( list( \ "I have no admins online!",\ diff --git a/config/config.txt b/config/config.txt index 6f12881387b..c1bed2e1a60 100644 --- a/config/config.txt +++ b/config/config.txt @@ -196,4 +196,10 @@ NOTIFY_NEW_PLAYER_AGE 0 #LOG_RUNTIMES ##Comment this out if you've used the mass conversion sql proc for notes or want to stop converting notes -AUTOCONVERT_NOTES \ No newline at end of file +AUTOCONVERT_NOTES + +##Comment this out to stop admin messages sent anytime an admin disconnects from a round in play, you can edit the messages in admin.dm +ANNOUNCE_ADMIN_LOGOUT + +##Uncomment to have an admin message sent anytime an admin connects to a round in play, you can edit the messages in admin.dm +#ANNOUNCE_ADMIN_LOGIN \ No newline at end of file