TG: - All PM links are now tied to clients and not mobs. What this means is that all

PM links (the links admins get in admin messages which lead to a PM) should now
point directly to the client, if one still exists or report them as
disconnected. This means that there should no longer be problems with clients
which swap mobs.
- Made the player-side admin pm message more visible and obnoxious. Some players
might find it annoying but at least it will not leave much room to complain
about "missing PM-s"
Screenshot:
http://www.kamletos.si/admin%20message%20format.PNG
- Fixed that awkward X in asay messages, which moved whatever mob you were in to
the location of the person who said the message. Replaced it with JMP, which
does the same as the JMP in adminhelps - makes a ghost and moves that ghost to
the location:
Screenshot:
http://www.kamletos.si/admin%20say.PNG
- Ghosts which find themselves locked in any form of container (closets most
commonly) will now (FINALLY) exit the container (and it is any container!) after
they click one of the arrow keys.
Revision: r3121
Author: 	 baloh.matevz

Also some missed things from the config.txt
This commit is contained in:
Ren Erthilo
2012-04-23 00:57:48 +01:00
parent b6e7adbcbd
commit d482d02a79
7 changed files with 147 additions and 53 deletions

View File

@@ -769,6 +769,7 @@
#include "code\modules\admin\player_panel.dm"
#include "code\modules\admin\verbs\adminhelp.dm"
#include "code\modules\admin\verbs\adminjump.dm"
#include "code\modules\admin\verbs\adminpm.dm"
#include "code\modules\admin\verbs\adminsay.dm"
#include "code\modules\admin\verbs\atmosdebug.dm"
#include "code\modules\admin\verbs\BrokenInhands.dm"

View File

@@ -33,6 +33,7 @@
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/Tensioner_Active = 0 // If the tensioner is running.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/list/mode_names = list()
var/list/modes = list() // allowed modes
@@ -287,6 +288,8 @@
if("forbid_singulo_possession")
forbid_singulo_possession = 1
if("popup_admin_pm")
config.popup_admin_pm = 1
if("useircbot")
useircbot = 1

View File

@@ -132,7 +132,8 @@
verbs += /obj/admins/proc/show_player_panel
verbs += /client/proc/deadchat //toggles deadchat
verbs += /client/proc/cmd_admin_mute
verbs += /client/proc/cmd_admin_pm
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/warn
verbs += /obj/admins/proc/announce
@@ -799,7 +800,8 @@
verbs += /client/proc/game_panel
// verbs += /client/proc/player_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/cmd_admin_pm
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/admin_invis

View File

@@ -1,27 +1,34 @@
/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(!msg) return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if (!msg) return
// if (usr.client && usr.client.muted_complete)
// return
if(mob)
var/ref_mob = "\ref[src.mob]"
for (var/client/X)
if (X.holder)
if(X.sound_adminhelp)
X << 'adminhelp.ogg'
X << "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?src=\ref[X.holder];adminplayervars=[ref_mob]'>VV</A>) (<A HREF='?src=\ref[X.holder];adminplayersubtlemessage=[ref_mob]'>SM</A>) (<A HREF='?src=\ref[X.holder];adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
else
var/ref_client = "\ref[src]"
for (var/client/X)
if (X.holder)
if(X.sound_adminhelp)
X << 'adminhelp.ogg'
X << "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminplayervars=[ref_client]'>VV</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
for (var/mob/M in world)
if (M.client && M.client.holder && (M.client.holder.level != -3))
if(M.client.sound_adminhelp)
M << 'adminhelp.ogg'
M << "\blue <b><font color=red>HELP: </font>[key_name(src, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[M.client.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]")
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
msg = sanitize_simple(msg, replacechars)
send2adminirc("#bs12admin","HELP: \"[src.key]: [msg]\"")
if(tension_master)
tension_master.new_adminhelp()
send2adminirc("#bs12admin","HELP: \"[src.key]: [msg]\"")
//feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return

View File

@@ -0,0 +1,107 @@
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
/client/proc/cmd_admin_pm_context(mob/M as mob in world)
set category = null
set name = "Admin PM Mob"
if(!holder)
src << "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>"
return
if( !ismob(M) || !M.client ) return
cmd_admin_pm(M.client,null)
feedback_add_details("admin_verb","APMM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm
/client/proc/cmd_admin_pm_panel()
set category = "Admin"
set name = "Admin PM"
if(!holder)
src << "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>"
return
var/list/client/targets[0]
for(var/client/T)
if(T.mob)
if(istype(T.mob, /mob/new_player))
targets["(New Player) - [T]"] = T
else if(istype(T.mob, /mob/dead/observer))
targets["[T.mob.name](Ghost) - [T]"] = T
else
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
else
targets["(No Mob) - [T]"] = T
var/list/sorted = sortList(targets)
var/target = input(src,"To whom shall we send a message?","Admin PM",null) in sorted|null
cmd_admin_pm(targets[target],null)
feedback_add_details("admin_verb","APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//takes input from cmd_admin_pm_context, cmd_admin_pm_panel or /client/Topic and sends them a PM.
//Fetching a message if needed. src is the sender and C is the target client
/client/proc/cmd_admin_pm(var/client/C, var/msg)
if(src.muted_complete)
src << "<font color='red'>Error: Admin-PM: You are completely muted.</font>"
return
if( !C || !istype(C,/client) )
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else adminhelp(msg) //admin we are replying to left. adminhelp instead
return
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [C.key]") as text|null
if(!msg) return
if(!C)
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
//clean the message if it's not sent by a GA or GM
if( !holder || !(holder.rank in list("Game Admin", "Game Master")) )
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
if(C.holder)
if(holder) //both are admins
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
else //recipient is an admin but sender is not
C << "<font color='red'>Reply PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
//play the recieving admin the adminhelp sound (if they have them enabled)
if(C.sound_adminhelp)
C << 'adminhelp.ogg'
else
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
// C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 0)]</b>: [msg]</font>"
C << "<font color='red'><i>Click on the administrator's name to reply.</i></font>"
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
//always play non-admin recipients the adminhelp sound
// C << 'adminhelp.ogg'
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
if(config.popup_admin_pm)
spawn() //so we don't hold the caller proc up
var/sender = src
var/sendername = key
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
if(C && reply)
if(sender)
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
else
adminhelp(reply) //sender has left, adminhelp instead
return
else //neither are admins
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
return
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X) //there are fewer clients than mobs
if(X.holder && X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X

View File

@@ -85,39 +85,6 @@
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1)
/client/proc/cmd_admin_pm(mob/M as mob in world)
set category = "Admin"
set name = "Admin PM"
if(!holder)
src << "Only administrators may use this command."
return
if(M)
if(src.muted_complete)
src << "You are muted have a nice day"
return
if (!( ismob(M) ))
return
var/t = input("Message:", text("Private message to [M.key]")) as text|null
if(holder.rank != "Game Admin" && holder.rank != "Game Master")
t = strip_html(t,500)
if (!( t ))
return
if (usr.client && usr.client.holder)
M << "\red Admin PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
usr << "\blue Admin PM to-<b>[key_name(M, usr, 1)]</b>: [t]"
else
if (M.client && M.client.holder)
M << "\blue Reply PM from-<b>[key_name(usr, M, 1)]</b>: [t]"
else
M << "\red Reply PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
usr << "\blue Reply PM to-<b>[key_name(M, usr, 0)]</b>: [t]"
log_admin("PM: [key_name(usr)]->[key_name(M)] : [t]")
for(var/mob/K in world) //we don't use message_admins here because the sender/receiver might get it too
if(K && K.client && K.client.holder && K.key != usr.key && K.key != M.key)
K << "<B><font color='blue'>PM: [key_name(usr, K)]-&gt;[key_name(M, K)]:</B> \blue [t]</font>"
/client/proc/cmd_admin_mute(mob/M as mob in world)
set category = "Special Verbs"
set name = "Admin Mute"

View File

@@ -129,5 +129,12 @@ GUEST_JOBBAN 1
##Toggle for having jobs load up from the .txt
# LOAD_JOBS_FROM_TXT
##Remove the # mark infront of this to forbid admins from posssessing the singularity.
#FORBID_SINGULO_POSSESSION
## Remove the # to show a popup 'reply to' window to every non-admin that recieves an adminPM.
## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off)
#POPUP_ADMIN_PM
##What address should banned people appeal ther ban at? Remember to escape the characters, if needed!
# APPEAL_ADDRESS -->APPEAL ADDRESS HERE<--