Esempio n. 1
0
        public void SendMessage()
        {
            string text = inputField.text;

            if (text.Length <= 0)
            {
                return;
            }

            //Add the no parse tag so users can't edit their text
            StringBuilder newText = new StringBuilder();

            newText.Append("<noparse>").Append(text).Append("</noparse>");

            ChatMessage chatMessage = new ChatMessage();

            chatMessage.Channel = currentTabData.Channels[channelDropDown.value];
            chatMessage.Text    = newText.ToString();
            inputField.text     = "";
            if (chatRegister.RestrictedChannels.Contains(chatMessage.Channel.Name))
            {
                return; //do not allow talking in restricted channels
            }

            chatRegister.CmdSendMessage(chatMessage);
        }
Esempio n. 2
0
        public void SendMessage()
        {
            string text = inputField.text;

            if (text.Length <= 0)
            {
                return;
            }

            ChatMessage chatMessage = new ChatMessage();

            chatMessage.Channel = currentTabData.Channels[channelDropDown.value];
            chatMessage.Text    = text;
            inputField.text     = "";
            if (chatRegister.RestrictedChannels.Contains(chatMessage.Channel.Name))
            {
                return; //do not allow talking in restricted channels
            }

            chatRegister.CmdSendMessage(chatMessage);
        }