Exemplo n.º 1
0
        private void eliminarSaludoMod(ChatCommandRequest cmd)
        {
            List <TUserSaludo> ms = obternetSaludos();

            ms.Remove(ms.Find(x => x.Name == cmd.argumentos[0]));
            escribirListaSaludos(ms);
        }
Exemplo n.º 2
0
        private void eliminarComando(ChatCommandRequest cmd)
        {
            List <ChatCommand> lc = obternetListaComandos();

            lc.Remove(lc.Find(x => x.Key == cmd.argumentos[0]));
            escribirListaComandos(lc);
        }
Exemplo n.º 3
0
        private static string HTMLGeneratedIMG(ChatCommandRequest cmd)
        {
            return(@"<!DOCTYPE html>
 <html lang=""en"" xmlns=""http://www.w3.org/1999/xhtml"" >
    <head>
        <meta charset = ""utf-8"" />
  <link href=""style.css"" rel=""stylesheet"" />
  <link href=""https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css"" rel=""stylesheet"" />
   <script src=""https://code.jquery.com/jquery-3.2.1.js""></script>
<script type=""text/javascript"">
$(document).ready(function() {
    setTimeout(function() {
        $("".content"").fadeOut(500);
    },12500);
	})
	</script>
            <title></title>
     </head>
     <body>
<div class=""content"">
       <img class=""animated rollIn"" width=""720"" height=""480"" src=""" + cmd.argumentos[0] + @""" />
</div>      
</body>
      </html>");
        }
Exemplo n.º 4
0
        private void agregarComando(ChatCommandRequest cmd)
        {
            ChatCommand        newCmd = newCommand(cmd);
            List <ChatCommand> lc     = obternetListaComandos();

            lc.Add(newCmd);
            escribirListaComandos(lc);
        }
Exemplo n.º 5
0
        private void agregarSaludoMod(ChatCommandRequest cmd)
        {
            TUserSaludo        salud = obtenerSaludo(cmd);
            List <TUserSaludo> ms    = obternetSaludos();

            ms.Add(salud);
            escribirListaSaludos(ms);
        }
Exemplo n.º 6
0
 private static ChatCommand newCommand(ChatCommandRequest cmd)
 {
     return(new ChatCommand()
     {
         Key = cmd.argumentos[0],
         Value = cmd.Value.Substring(cmd.argumentos[0].Length + 1),
         argumentos = cmd.argumentos
     });
 }
Exemplo n.º 7
0
        private void editarComando(ChatCommandRequest cmd)
        {
            ChatCommand        newCmd = newCommand(cmd);
            List <ChatCommand> lc     = obternetListaComandos();

            lc.Remove(lc.Find(x => x.Key == newCmd.Key));
            lc.Add(newCmd);
            escribirListaComandos(lc);
        }
Exemplo n.º 8
0
        private static TUserSaludo obtenerSaludo(ChatCommandRequest cmd)
        {
            TUserSaludo salud = new TUserSaludo();

            salud.Name    = cmd.argumentos[0];
            salud.Channel = Channel;
            salud.Saludo  = cmd.Value.Substring(cmd.argumentos[0].Length + 1);
            return(salud);
        }
Exemplo n.º 9
0
 private void commandRecived(OnMessageReceivedArgs e, out ChatCommandRequest cmd, out string[] arg)
 {
     cmd            = new ChatCommandRequest();
     arg            = e.ChatMessage.Message.Split(" ");
     cmd.Key        = arg[0];
     cmd.Value      = e.ChatMessage.Message.Replace(cmd.Key + " ", "");
     cmd.argumentos = limpiarMensaje(e.ChatMessage.Message.Replace(cmd.Key + " ", "")).Split(" ");
     cmd.Channel    = Channel;
 }
Exemplo n.º 10
0
        private void agregarTimer(ChatCommandRequest cmd)
        {
            MessageAlias timer = new MessageAlias();

            timer.Time = int.Parse(cmd.argumentos[0]);
            if (cmd.argumentos[1].StartsWith('!'))
            {
                timer.command = listaComandos.Find(x => x.Key.Equals(cmd.argumentos[1]));
            }
            else
            {
                timer.value = cmd.Value.Substring(cmd.argumentos[0].Length + 1);
            }
            MessageAliasTimer timerT = new MessageAliasTimer();

            timerT.Time = int.Parse(cmd.argumentos[0]);
            if (cmd.argumentos[1].StartsWith('!'))
            {
                timerT.command = listaComandos.Find(x => x.Key.Equals(cmd.argumentos[1]));
            }
            else
            {
                timerT.value = cmd.Value.Substring(cmd.argumentos[0].Length + 1);
            }

            timerT.aTimer.Interval = timerT.Time * 60000;
            timerT.aTimer.Elapsed += (sender, e) => { OnTimePass(timerT); };
            timerT.aTimer.Enabled  = true;
            timerT.Channel         = Channel;
            listaTimers.Add(timerT);

            List <MessageAlias> mensages = obternetTimers <MessageAlias>();

            mensages.Add(timer);
            escribirListaTimers(mensages);
        }
Exemplo n.º 11
0
 private void editarSaludoMod(ChatCommandRequest cmd)
 {
     eliminarSaludoMod(cmd);
     agregarSaludoMod(cmd);
 }
Exemplo n.º 12
0
 private void eliminarTimer(ChatCommandRequest cmd)
 {
     List <MessageAlias> mensages = obternetTimers <MessageAlias>();
 }