Inheritance: HasVictim
Beispiel #1
0
        public void AutoMutedWordDatatbaseIncrementTest()
        {
            const string nick = "simpleuser";
              const string mutedWord = "mutephrase";

              InitializeDatastore.Run();
              Datastore.AddToStateString(MagicStrings.MutedWords, mutedWord, TimeSpan.FromMinutes(10).TotalSeconds, Datastore.MutedWords);

              var banner = new Banner(new PublicMessage(nick, mutedWord), null, new List<Message>());

              foreach (var i in Enumerable.Range(1, 10)) {
            banner.BanParser(true);
            Assert.AreEqual(i, Datastore.UserHistory(nick).History[MagicStrings.MutedWords][mutedWord]);
              }

              var testMute = new Mute { Duration = TimeSpan.FromDays(8) };
              Assert.AreEqual(testMute.Duration, TimeSpan.FromDays(7));
        }
Beispiel #2
0
 public void Visit(Mute mute)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
 public override void Visit(Mute mute)
 {
     var obj = new MuteSender(mute.Victim, mute.Duration);
       _websocket.Send($"MUTE {JsonConvert.SerializeObject(obj)}");
 }
Beispiel #4
0
 public override void Visit(Mute mute)
 {
     SendMsg($".timeout {mute.Victim} {mute.Duration.TotalSeconds}");
 }
Beispiel #5
0
 public void Visit(Mute mute) {
   Print(mute);
 }
Beispiel #6
0
 public void Process(Mute mute)
 {
 }
Beispiel #7
0
 public void Process(Mute mute)
 {
     _sender.Invoke($"<{mute.Sender.OriginalNick}> <=== just muted {mute.Victim}");
 }
Beispiel #8
0
 public virtual void Visit(Mute mute)
 {
     Print(mute);
 }