Merge pull request #4881 from Ccomp5950/botfix

Admin empowerment:  Allowing Admins in IRC to respond to ahelps
This commit is contained in:
Mloc
2014-05-03 11:04:43 +01:00
7 changed files with 134 additions and 2 deletions

View File

@@ -182,3 +182,28 @@
continue
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD) )
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
/client/proc/cmd_admin_irc_pm()
if(prefs.muted & MUTE_ADMINHELP)
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
return
var/msg = input(src,"Message:", "Private message to admins on IRC / 400 character limit") as text|null
sanitize(msg)
if(length(msg) > 400) // TODO: if message length is over 400, divide it up into seperate messages, the message length restriction is based on IRC limitations. Probably easier to do this on the bots ends.
src << "\red Your message was not sent because it was more then 400 characters find your message below for ease of copy/pasting"
src << "\blue [msg]"
return
send2adminirc("PlayerPM from [key_name(src)]: [html_decode(msg)]")
src << "<font color='blue'>IRC PM to-<b>IRC-Admins</b>: [msg]</font>"
log_admin("PM: [key_name(src)]->IRC: [msg]")
for(var/client/X in admins)
if(X == src)
continue
if((X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD))
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;IRC-Admins:</B> \blue [msg]</font>"