示例#1
0
 protected void SendCommon(IClientVisitor client)
 {
     if (!SilentReason && !string.IsNullOrWhiteSpace(Reason))
     {
         client.Visit(new PublicMessage(Reason));
     }
 }
示例#2
0
 public override void Accept(IClientVisitor visitor)
 {
     foreach (var submessage in OriginalText.Split('\n'))
     {
         visitor.Visit(new PublicMessage(submessage));
     }
 }
示例#3
0
        private void ProcessConsoleInput()
        {
            while (true)
            {
                //Process.GetCurrentProcess().WaitForExit(); // If you ever have to get rid of the while(true)
                var input = Console.ReadLine();
                if (string.IsNullOrEmpty(input))
                {
                    continue;
                }
                if (input == "exit")
                {
                    return;
                }

                if (input[0] == '~')
                {
                    _client.Visit(new PublicMessage(input.Substring(1)));
                }
                if (input[0] == '!')
                {
                    _client.Forward(new ModPublicMessage("SYSTEM CONSOLE", input));
                }
            }
        }
示例#4
0
文件: Ban.cs 项目: destinygg/bot
 public override void Accept(IClientVisitor visitor)
 {
     if (string.IsNullOrWhiteSpace(Reason)) {
     SilentReason = true;
     Reason = "Manual bot ban.";
       }
       visitor.Visit(this);
       base.SendCommon(visitor);
 }
示例#5
0
 public override void Accept(IClientVisitor visitor)
 {
     if (string.IsNullOrWhiteSpace(Reason))
     {
         SilentReason = true;
         Reason       = "Manual bot ban.";
     }
     visitor.Visit(this);
     base.SendCommon(visitor);
 }
示例#6
0
 public override void Accept(IClientVisitor visitor)
 {
     visitor.Visit(this);
 }
示例#7
0
文件: Mute.cs 项目: mikehrod2016/bot
 public override void Accept(IClientVisitor visitor)
 {
     visitor.Visit(this);
     base.SendCommon(visitor);
 }
示例#8
0
 public override void Accept(IClientVisitor visitor)
 {
     visitor.Visit(this);
 }
示例#9
0
 public void Accept(IClientVisitor visitor)
 {
     visitor.Visit(this);
 }
示例#10
0
 public void Accept(IClientVisitor visitor)
 {
     visitor.Visit(this);
 }
示例#11
0
 public override void Accept(IClientVisitor visitor)
 {
     foreach (var submessage in OriginalText.Split('\n')) {
     visitor.Visit(new PublicMessage(submessage));
       }
 }
示例#12
0
文件: Mute.cs 项目: destinygg/bot
 public override void Accept(IClientVisitor visitor)
 {
     visitor.Visit(this);
       base.SendCommon(visitor);
 }
示例#13
0
 protected void SendCommon(IClientVisitor client)
 {
     if (!SilentReason && !string.IsNullOrWhiteSpace(Reason)) {
     client.Visit(new PublicMessage(Reason));
       }
 }