public void ReconTest() { MonoCatConfig config = new MonoCatConfig() { Name = "monocat", Nick = "monocat",//"monocat" + DateTime.Now.Second, Server = "kornbluth.freenode.net", Port = 6697, Cipher = "blowfish", ChannelList = new String[] { "#shrew-dev", "#screenage" } }; TcpClient tcpClient = new TcpClient(config.Server, config.Port); SslStream stream = new SslStream(tcpClient.GetStream(), false, new RemoteCertificateValidationCallback((a, b, c, d) => { return true; })); Boolean visited = false; var async = stream.BeginAuthenticateAsClient(config.Server, (result) => { var s = (SslStream)result.AsyncState; s.EndAuthenticateAsClient(result); visited = true; Trace.TraceInformation("Auth req finished."); }, stream); Trace.TraceInformation("Sent auth req."); Thread.Sleep(1000); Assert.IsTrue(stream.IsAuthenticated); Assert.IsTrue(stream.IsEncrypted); Assert.IsTrue(visited); }
public static int Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); MonoCatConfig config = new MonoCatConfig() { Name = "monocat", Nick = "monocat",//"monocat" + DateTime.Now.Second, Server = "kornbluth.freenode.net", Port = 6697, Cipher = "blowfish", ChannelList = new String[] { "#shrew-dev", "#screenage" } }; MonoCatBot bot = new MonoCatBot(config); bot.Run(); return 0; }
public MonoCatBot(MonoCatConfig config) { this.config = config; sendQueue = new SendQueue(this); }