diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index 1a2880b341a..bbe0c4d31cd 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -1,5 +1,6 @@ var/global/obj/effect/overlay/plmaster = null // atmospheric overlay for plasma var/global/obj/effect/overlay/slmaster = null // atmospheric overlay for sleeping gas +var/admin_notice = null // Admin notice that all clients see when joining the server // nanomanager, the manager for Nano UIs diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 51c297fb101..87289267d97 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -76,4 +76,25 @@ var/global/normal_ooc_colour = "#002eb8" prefs.ooccolor = sanitize_ooccolor(new_ooccolor) prefs.save_preferences() feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return \ No newline at end of file + return + +//Checks admin notice +/client/verb/admin_notice() + set name = "Adminnotice" + set category = "Admin" + set desc ="Check the admin notice if it has been set" + + if(admin_notice) + src << "\blue Admin Notice:\n \t [admin_notice]" + else + src << "\blue There are no admin notices at the moment." + +/client/verb/motd() + set name = "MOTD" + set category = "OOC" + set desc ="Check the Message of the Day" + + if(join_motd) + src << "
[join_motd]
" + else + src << "\blue The Message of the Day has not been set." \ No newline at end of file diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ac4c3405b90..1f26ad0e918 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -537,6 +537,25 @@ var/global/floorIsLava = 0 log_admin("Announce: [key_name(usr)] : [message]") feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/datum/admins/proc/set_admin_notice() + set category = "Special Verbs" + set name = "Set Admin Notice" + set desc ="Set an announcement that appears to everyone who joins the server. Only lasts this round" + if(!check_rights(0)) return + + admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",admin_notice) as null|message + switch(admin_notice) + if(null) + return + if("") + message_admins("[key_name(usr)] removed the admin notice.") + log_admin("[key_name(usr)] removed the admin notice:\n[admin_notice]") + return + message_admins("[key_name(usr)] set the admin notice.") + log_admin("[key_name(usr)] set the admin notice:\n[admin_notice]") + world << "\blue Admin Notice:\n \t [admin_notice]" + feedback_add_details("admin_verb","SAN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + /datum/admins/proc/toggleooc() set category = "Server" set desc="Toggle dis bitch" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 745d9cd6caa..a098cf02d2c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -27,6 +27,7 @@ var/list/admin_verbs_admin = list( /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /datum/admins/proc/announce, /*priority announce something to all clients.*/ + /datum/admins/proc/set_admin_notice,/*announcement all clients see when joining the server.*/ /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/ /client/proc/toggle_view_range, /*changes how far we can see*/ /datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/ @@ -138,6 +139,7 @@ var/list/admin_verbs_hideable = list( /datum/admins/proc/toggleenter, /datum/admins/proc/toggleguests, /datum/admins/proc/announce, + /datum/admins/proc/set_admin_notice, /client/proc/admin_ghost, /client/proc/toggle_view_range, /datum/admins/proc/view_txt_log, diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 534ce1a7c11..b067cc0618c 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -3,6 +3,9 @@ if(join_motd) src << "
[join_motd]
" + if(admin_notice) + src << "\blue Admin Notice:\n \t [admin_notice]" + if(!mind) mind = new /datum/mind(key) mind.active = 1