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

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

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