コード例 #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);
 }