ID:164828
 
For the record, before anybody makes the obvious suggestions of checking the DM Guide, ByondBwicki, or going through previous topics, I tried all of those. I may have missed something though, so if there's an obvious answer staring me in the face and I'm missing it, please say so.

My problem/question is, how would I set Administrator/GM only verbs? (the only one coming to mind at the moment would be "Mute," for example, to mute a player from Say/Whisper etc. verbs) I know how to set keys that would be the aforementioned ranks, and how to check for them, but I'm still not sure how to set the verbs. (Another example would be to change a player's name upon request). Thanks in advance for any help.
The usual way to make GM verbs is to make them under a dummy mob type (mob/GM, for example) and make the player gain them if their key is in a list of admins.
There is a couple ways to Mute a player. One way is to use a verb to remove all there types of communication verbs. The way I like to do it is run a check when the user tries to talk like below:


mob
GM
verb
Mute(var/mob/M in world)
set category = "GM"
world << "[M] has been muted!"
M.Muted = 1

UnMute(var/mob/M in world)
set category = "GM"
world << "[M] has been unmuted!"
M.Muted = 0

Then when they attempt to use the Say verb...


mob/verb/Say(T as text)
if(Muted)
src << "Optional mute message here"
return
else
world << "[src]:[T]"

Of course you would want to add the filters and anything else to your say verb but thats just a demonstration for you.


Almost forgot, to add the GM verbs to the player just call a proc under the Login() to check the list of gms(which you said you already knew how to do) and if they are in the list just put
src.verbs+=typesof(mob/GM/verb)
to give them the verbs located under GM. In this case would be Mute and Unmute. There are much better ways than to give the client the verbs under the login but this is just to show you a way it could be done. Good luck.
In response to Derekjeterisgod
Thank you, btoh of you. This helps tremendously.