コード例 #1
0
        public void Initialize()
        {
            var tup = Initializer.GetAuthenticatedNetwork(Nickname, RealName);

            this._wrapper = tup.Item2;
            this._channel = tup.Item1.GetChannel("#channel");
        }
コード例 #2
0
 public void Irc_RealLife_BeginConnection()
 {
     this._wrapper = new TestTcpWrapper();
     this._network = new IrcNetwork(this._wrapper);
     this._network.ConnectAsync("Aethec", "Aethec", IrcUserLoginModes.None).Wait();
     this._wrapper.ReceiveLine(":main.smoothirc.net NOTICE Auth :*** Looking up your hostname...");
     this._wrapper.ReceiveLine(":main.smoothirc.net NOTICE Auth :*** Found your hostname (adsl-84-226-156-139.adslplus.ch) -- cached");
     this._wrapper.ReceiveLine(":main.smoothirc.net NOTICE Auth :Welcome to SmoothIRC!");
     this._wrapper.ReceiveLine(":main.smoothirc.net 001 Aethec :Welcome to the SmoothIRC IRC Network [email protected]");
     this._wrapper.ReceiveLine(":main.smoothirc.net 002 Aethec :Your host is main.smoothirc.net, running version InspIRCd-2.0");
     this._wrapper.ReceiveLine(":main.smoothirc.net 003 Aethec :This server was created 15:07:46 Dec 15 2012");
     this._wrapper.ReceiveLine(":main.smoothirc.net 004 Aethec main.smoothirc.net InspIRCd-2.0 BGHIRSWikorswx CFGMORSTabcefhijklmnopqrstuvz Fabefhjkloqv");
     this._wrapper.ReceiveLine(":main.smoothirc.net 005 Aethec AWAYLEN=201 :are supported by this server");
     this._wrapper.ReceiveLine(":main.smoothirc.net 042 Aethec 540AAACYH :your unique ID");
     this._wrapper.ReceiveLine(":main.smoothirc.net 375 Aethec :main.smoothirc.net message of the day");
     this._wrapper.ReceiveLine(":main.smoothirc.net 372 Aethec :- (MOTD cut)");
     this._wrapper.ReceiveLine(":main.smoothirc.net 372 Aethec :- (for brevity)");
     this._wrapper.ReceiveLine(":main.smoothirc.net 376 Aethec :End of message of the day.");
     this._wrapper.ReceiveLine(":main.smoothirc.net 251 Aethec :There are 42 users and 15 invisible on 4 servers");
     this._wrapper.ReceiveLine(":main.smoothirc.net 252 Aethec 10 :operator(s) online");
     this._wrapper.ReceiveLine(":main.smoothirc.net 254 Aethec 20 :channels formed");
     this._wrapper.ReceiveLine(":main.smoothirc.net 255 Aethec :I have 18 clients and 3 servers");
     this._wrapper.ReceiveLine(":main.smoothirc.net 265 Aethec :Current Local Users: 18  Max: 46");
     this._wrapper.ReceiveLine(":main.smoothirc.net 266 Aethec :Current Global Users: 57  Max: 69");
     this._wrapper.ReceiveLine(":main.smoothirc.net 396 Aethec Smooth-un4lig.adslplus.ch :is now your displayed host");
     this._wrapper.ReceiveLine(":[email protected] MODE Aethec +x");
 }
コード例 #3
0
        public void Initialize()
        {
            var tup = Initializer.GetAuthenticatedNetwork(Nickname, RealName);

            this._network = tup.Item1;
            this._wrapper = tup.Item2;
        }
コード例 #4
0
        public void Initialize()
        {
            var tup = Initializer.GetAuthenticatedNetwork("nick", "real");

            this._network = tup.Item1;
            this._wrapper = tup.Item2;
        }
コード例 #5
0
        public void Initialize()
        {
            var tup = Initializer.GetAuthenticatedNetwork();

            this._network = tup.Item1;
            this._wrapper = tup.Item2;
            this._channel = this._network.GetChannel("#channel");
        }
コード例 #6
0
        public void Stop_DoNotDisposeListener()
        {
            IdentServer.UserNameNeeded += (s, e) => e.UserName = "******";

            var client   = new TestTcpWrapper();
            var listener = new TestTcpListenerWrapper();

            IdentServer.Start(listener);
            IdentServer.Stop(false);
            Assert.IsFalse(listener.Disposed);
        }
コード例 #7
0
        public void Initialize()
        {
            this._translator = new TestTranslator();

            var wrapper = new TestTcpWrapper();

            this._network = IrcNetwork.Get(wrapper);
            this._network.Connect();
            wrapper.EndConnect();
            this._network.Authenticate("Test", "Test", IrcUserLoginModes.None);

            Locator.Register <ITranslationService>(this._translator);
        }
コード例 #8
0
        public void Stop_DisposeListener()
        {
            IdentServer.UserNameNeeded += (s, e) => e.UserName = "******";

            var client   = new TestTcpWrapper();
            var listener = new TestTcpListenerWrapper();

            IdentServer.Start(listener);
            IdentServer.Stop();
            listener.AddClient(client);
            client.ReceiveLine("0,0");
            Assert.AreEqual(0, client.LinesSent.Count);
            Assert.IsTrue(listener.Disposed);
        }