Ejemplo n.º 1
0
        public static void SendLogout(HitboxChat client, string name)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"partChannel\",");
            sb.Append("\"params\":{");
            sb.Append("\"name\":\"").Append(name);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 2
0
        public static void SendUserList(HitboxChat client, string channel)
        {
            var sb = new StringBuilder(BaseMessage);

            sb.Append("\"method\":\"getChannelUserList\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower());
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 3
0
        public static void SendLogout(HitboxChat client, string name)
        {
            var sb = new StringBuilder(BaseMessage);

            sb.Append("\"method\":\"partChannel\",");
            sb.Append("\"params\":{");
            sb.Append("\"name\":\"").Append(name);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 4
0
        public static void SendRemoveMod(HitboxChat client, string channel, string name, string token)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"removeMod\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"token\":\"").Append(token);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 5
0
        public static void SendRemoveMod(HitboxChat client, string channel, string name, string token)
        {
            var sb = new StringBuilder(BaseMessage);

            sb.Append("\"method\":\"removeMod\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"token\":\"").Append(token);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 6
0
        public static void SendChatMessage(HitboxChat client, string channel, string name, string nameColor, string text)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"chatMsg\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel).Append("\",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"nameColor\":\"").Append(nameColor).Append("\",");
            sb.Append("\"text\":\"").Append(text);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 7
0
        public static void SendChatMessage(HitboxChat client, string channel, string name, string nameColor, string text)
        {
            var sb = new StringBuilder(BaseMessage);

            sb.Append("\"method\":\"chatMsg\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel).Append("\",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"nameColor\":\"").Append(nameColor).Append("\",");
            sb.Append("\"text\":\"").Append(text);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 8
0
        public static void SendJoinRequest(HitboxChat client, string channel, string name, string token, bool notify, bool isAdmin)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"joinChannel\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            sb.Append("\"notify\":").Append(notify.ToString().ToLower()).Append(",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"isAdmin\":").Append(isAdmin.ToString().ToLower()).Append(",");
            sb.Append("\"token\":\"").Append(token);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 9
0
        public static void SendJoinRequest(HitboxChat client, string channel, string name, string token, bool notify, bool isAdmin)
        {
            var sb = new StringBuilder(BaseMessage);

            sb.Append("\"method\":\"joinChannel\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            sb.Append("\"notify\":").Append(notify.ToString().ToLower()).Append(",");
            sb.Append("\"name\":\"").Append(name).Append("\",");
            sb.Append("\"isAdmin\":").Append(isAdmin.ToString().ToLower()).Append(",");
            sb.Append("\"token\":\"").Append(token);
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 10
0
        public static void SendSlowSubMode(HitboxChat client, string channel, int time, bool sub)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"slowMode\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            if (!sub)
                sb.Append("\"time\":").Append(time).Append(",");
            sb.Append("\"subscriber\":\"").Append(sub);
            if (sub)
            {
                sb.Append("\",");
                sb.Append("\"sub\":").Append(0);
            }
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 11
0
        public static void SendSlowSubMode(HitboxChat client, string channel, int time, bool sub)
        {
            var sb = new StringBuilder(BaseMessage);

            sb.Append("\"method\":\"slowMode\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower()).Append("\",");
            if (!sub)
            {
                sb.Append("\"time\":").Append(time).Append(",");
            }
            sb.Append("\"subscriber\":\"").Append(sub);
            if (sub)
            {
                sb.Append("\",");
                sb.Append("\"sub\":").Append(0);
            }
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }
Ejemplo n.º 12
0
        public static void SendUserList(HitboxChat client, string channel)
        {
            var sb = new StringBuilder(BaseMessage);
            sb.Append("\"method\":\"getChannelUserList\",");
            sb.Append("\"params\":{");
            sb.Append("\"channel\":\"").Append(channel.ToLower());
            sb.Append("\"}}]}");

            //Logger.Info("[Client@" + client.GetChannel() + "] Sending join request...");

            client.Send(sb.ToString());
        }