Ejemplo n.º 1
0
    void InitIRCChat()
    {
        //IRC.SendCommand("CAP REQ :twitch.tv/tags"); //register for additional data such as emote-ids, name color etc.

        IRCChat.SetMessageRecievedListener(msg => {
            int msgIndex     = msg.IndexOf("PRIVMSG #");
            string msgString = msg.Substring(msgIndex + settings.ChatChannelName.Length + 11);
            string user      = msg.Substring(1, msg.IndexOf('!') - 1);
            apg.RecordMostRecentChat(user, msgString);
        });

        IRCChat.SendMsg("*** Chat Channel Initialized ***");
    }
Ejemplo n.º 2
0
    void InitIRCLogicChannel()
    {
        IRCLogic.SetMessageRecievedListener(msg => {
            int msgIndex     = msg.IndexOf("PRIVMSG #");
            string msgString = msg.Substring(msgIndex + settings.LogicChannelName.Length + 11);
            string user      = msg.Substring(1, msg.IndexOf('!') - 1);

            Debug.Log(" " + msgString);

            apg.RunHandler(user, msgString);

            recorder.WriteFromClientMsg(time, user, msgString);
        });

        IRCLogic.SendMsg("*** Logic Channel Initialized ***");
    }