public override void Run()
        {
            var replyTo = ReplyTargets.First().Name;
            if (replyTo.Contains("#"))
            {
                SendMessage("Send privmsg, så blir ikke kanalen spammet");
                return;
            }

            if (Parameters.Count == 0)
            {
                SendMessage("Syntaks: !logg #kanal <timer, valgfritt>");
                return;
            }

            var channel = Parameters[0].Replace("#", string.Empty);

            var hours = 24;
            if (Parameters.Count > 1)
                hours = Convert.ToInt32(Parameters[1]);

            var entries = new ChatLog().Get(channel, hours);

            foreach (var chatEntry in entries)
            {
                SendMessage(chatEntry.ToString());
            }
        }
Exemple #2
0
 public AzureBot()
 {
     _chatLog = new ChatLog();
     Connect();
 }