Example #1
0
        /// <summary>
        /// Broadcasts a chat message to all users
        /// </summary>
        /// <param name="message"></param>
        public void Broadcast(string message)
        {
            var chatLine = new ChatLine
            {
                mPlayer     = -1,
                mPlayerName = "", // TODO: Test if prefix can be left out
                mText       = message,
                mType       = ChatLine.Type.Normal
            };

            NetworkManager.instance.QueueChatMessage(chatLine);
            ServerConsole.DebugLog($"[SERVER] {message}");
        }