Here is a code snippet like the one above that does not require you to modify the core:
Scripts
PlayerMobile.cs
Add the lines in red to the PlayerMobile class:
Code:
public class PlayerMobile : Mobile
{
public override void DoSpeech( string text, int[] keywords, MessageType type, int hue )
{
if ( (int)type == 0x0F ) // If the message is of type GM
text = String.Format( "{0}{1}", Commands.CommandPrefix, text ); // then add the prefix to it
base.DoSpeech( text, keywords, type, hue ); // Process the same way as always
}