예제 #1
0
        public static String ReadMessage(TwitchIRCConnection connection)
        {
            String message = "";

            message = connection.Receive();

            if (message.ToLower().StartsWith("ping"))
            {
                TwitchIRCClient.SendServerMessage("PONG :tmi.twitch.tv", connection);
            }

            return(message);
        }
예제 #2
0
        public static int Restart(TwitchIRCConnection connection, bool extendedInformation)
        {
            if (connection.ConnectionStatus == 0 || connection.ConnectionStatus == 2)
            {
                TwitchIRCClient.Connect(connection, extendedInformation);
            }

            if (connection.ConnectionStatus == 1)
            {
                TwitchIRCClient.Disconnect(connection);
                TwitchIRCClient.Connect(connection, extendedInformation);
            }

            return(0);
        }
예제 #3
0
 public static int DepartChannel(String channelName, TwitchIRCConnection connection)
 {
     return(TwitchIRCClient.SendServerMessage("PART #" + channelName, connection));
 }
예제 #4
0
 public static int JoinChannel(String channelName, TwitchIRCConnection connection)
 {
     return(TwitchIRCClient.SendServerMessage("JOIN #" + channelName, connection));
 }
예제 #5
0
 public static int SendWisperMessage(String username, String message, TwitchIRCConnection connection)
 {
     return(TwitchIRCClient.SendServerMessage(".w " + username + " " + message, connection));
 }
예제 #6
0
 public static int SendChannelMessage(String channelName, String message, TwitchIRCConnection connection)
 {
     return(TwitchIRCClient.SendServerMessage("PRIVMSG #" + channelName + " :" + message, connection));
 }