예제 #1
0
 public void Add(string aServer)
 {
     aServer = aServer.Trim().ToLower();
     if (Server(aServer) == null)
     {
         var tServer = new Server {Name = aServer, Port = 6667, Enabled = true};
         Add(tServer);
     }
 }
예제 #2
0
        public void RegisterParser(Server.Irc.AParser aParser)
        {
            IrcParser = aParser;

            IrcParser.ParsingError += delegate(string aData) { EventParsingError = aData; };

            IrcParser.AddDownload += delegate(Packet aPack, long aChunk, IPAddress aIp, int aPort)
            {
                EventPacket = aPack;
                EventChunk = aChunk;
                EventIp = aIp;
                EventPort = aPort;
            };
            IrcParser.RemoveDownload += delegate(Bot aBot) { EventBot = aBot; };

            IrcParser.SendData += delegate(Core.Server aServer, string aData)
            {
                Assert.AreEqual(Server, aServer);
                EventData = aData;
            };
            IrcParser.JoinChannel += delegate(Core.Server aServer, Channel aChannel)
            {
                Assert.AreEqual(Server, aServer);
                EventChannel = aChannel;
            };
            IrcParser.CreateTimer += delegate(Core.Server aServer, AObject aObject, int aTime, bool aOverride)
            {
                Assert.AreEqual(Server, aServer);
                EventObject = aObject;
                EventTime = aTime;
                EventOverride = aOverride;
            };

            IrcParser.RequestFromBot += delegate(Core.Server aServer, Bot aBot)
            {
                Assert.AreEqual(Server, aServer);
                EventBot = aBot;
            };
            IrcParser.UnRequestFromBot += delegate(Core.Server aServer, Bot aBot)
            {
                Assert.AreEqual(Server, aServer);
                EventBot = aBot;
            };
        }
예제 #3
0
 public void Remove(Server aServer)
 {
     base.Remove(aServer);
 }
예제 #4
0
 public void Add(Server aServer)
 {
     base.Add(aServer);
 }