예제 #1
0
        private static CallbackResult OnAsciiSpeechRequest(byte[] data, CallbackResult prevResult)
        {
            AsciiSpeechRequest packet = new AsciiSpeechRequest(data);

            if (!Core.LoggedIn || packet.Text.Length == 0)
            {
                return(CallbackResult.Eat);
            }

            if (packet.Text[0] == ',')
            {
                ProcessCommand(packet.Text);
                return(CallbackResult.Eat);
            }
            else
            {
                return(CallbackResult.Normal);
            }
        }
예제 #2
0
        private static IMacroCommand OnAsciiSpeechRequest(byte[] data)
        {
            AsciiSpeechRequest packet = new AsciiSpeechRequest(data);

            return(new SpeechMacroCommand(packet.Color, packet.Text));
        }