Exemple #1
0
        private void MessageHandler(IRCMessage message)
        {
            //Console.WriteLine($"> {message.IRCReply}:  {message.RawParameters}");
            switch (message.Command)
            {
            case "PING":
                SendRawMessage("PONG :tmi.twitch.tv");     // SO twitch doesnt mark as inactive and disconnect us
                break;

            case "PRIVMSG":
                OnChatMessage?.Invoke(ChatMessage.Factory(message));
                break;

            default:
                Console.WriteLine("> UNHANDLED REPLY COMMAND  " + message.Command);
                break;
            }
        }