Files
vgstation13/code/modules/admin/verbs/adminsay.dm
elly1989@rocketmail.com a10f6e0ec2 Added a switch inside client/Topic which can direct the topic call to a few frequently used destinations.
Before, when making a link to an admin tool, you done this:
<a href='?src=\ref[C.holder];parameter=1;>link</a>

Now, we do not need to use a reference to direct it to places like usr or usr.client.holder (or client, but you never needed src for that anyway)
usr: <a href='?_src_=usr;parameter=1;>link</a>
holder: <a href='?_src_=holder;parameter=1;>link</a>

This basically allows us to move a LOT of code outside of loops as we no longer have to create a \ref for every recipient of the message. They can all be sent identical links. A simple example of this would be in pray.dm Although it's most noticeable in the adminhelp code which is vastly simplified.

Adminhelp name spotting code thingy...whatever... looks for ckey matches first, then surnames, then forenames. This is to stop it possibly weirding out if there is a station full of "Ed"s of "Sarah"s

Prayer code no longer loads a new icon into memory every time a prayer is sent. Use image() not icon()!

key_name() no longer needs a reference for it's admin_link argument.

message_admin() pretty much doesn't need those extra arguments for finding and replacing %holder_ref%. I've got to go through all the code to check before I remove it though.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5105 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-18 08:27:11 +00:00

21 lines
920 B
Plaintext

/client/proc/cmd_admin_say(msg as text)
set category = "Special Verbs"
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set hidden = 1
if(!check_rights(0)) return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg) return
log_admin("[key_name(src)] : [msg]")
if(check_rights(R_ADMIN,0))
msg = "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
admins << msg
else
msg = "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]:</EM> <span class='message'>[msg]</span></span>"
admins << msg
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!