Esempio n. 1
0
        /// <summary> Attempts to change the login message of the target player </summary>
        /// <remarks> Not allowed when players who cannot speak (e.g. muted) </remarks>
        public static bool SetLoginMessage(Player p, string target, string message)
        {
            if (message.Length == 0)
            {
                p.Message("Login message of {0} &Swas removed", p.FormatNick(target));
            }
            else
            {
                // Don't allow changing while muted
                if (!p.CheckCanSpeak("change login messages"))
                {
                    return(false);
                }

                p.Message("Login message of {0} &Swas changed to: {1}",
                          p.FormatNick(target), message);
            }

            PlayerDB.SetLoginMessage(target, message);
            return(true);
        }