Fixed my derp in cmd_admin_pm where the input popup was being displayed to usr rather than src (usr is the mob src is the client)

AdminHelps are now client verbs rather than mob verbs. Which means adminhelp can be called from cmd_admin_pm when an admin disconnects or something. This will stop non-admins getting the message "Client not found" (read as: license to grieffe) when an admin disconnects for whatever reason.

Moved AdminPM stuff to adminpm.dm

Fixed some run-times in posters and fixed posters eternally having the laying poster icon_state(whatever it was called) when something went awry.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3456 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-04-14 14:24:46 +00:00
parent 4863c83dd0
commit 1b0661c26b
7 changed files with 166 additions and 204 deletions

View File

@@ -1,14 +1,14 @@
/mob/verb/adminhelp(msg as text)
/client/verb/adminhelp(msg as text)
set category = "Admin"
set name = "Adminhelp"
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if (!msg)
if (muted_complete)
src << "<font color='red'>Error: Admin-PM: You are completely muted.</font>"
return
if (usr.client && usr.client.muted_complete)
return
if(!msg) return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if (!msg) return
for (var/client/X)
if (X.holder)
@@ -16,11 +16,11 @@
X << 'adminhelp.ogg'
X << "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[X.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[X.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[X.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
usr << "Your message has been broadcast to administrators."
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
log_admin("HELP: [key_name(src)]: [msg]")
if(tension_master)
tension_master.new_adminhelp()
send2irc(usr.ckey, msg)
send2irc(ckey, msg)
return
proc/send2irc(msg,msg2)