Esempio n. 1
0
        public void Connect()
        {
            try
            {
                IrcClientConnectionOptions options = null;

                if (Settings.Current.IRC.Ssl)
                {
                    options = new IrcClientConnectionOptions();
                    options.Ssl = true;
                    options.SslHostname = Settings.Current.IRC.Server;

                    if (Settings.Current.IRC.SslAcceptInvalid)
                    {
                        options.SslCertificateValidationCallback = (sender, certificate, chain, policyErrors) => true;
                    }
                }

                Client.Connect(Settings.Current.IRC.Server, Settings.Current.IRC.Port, options);
            }
            catch (Exception e)
            {
                Log.WriteError("IRC", "Failed to connect: {0}\n{1}", e.Message, e.StackTrace);
            }
        }
Esempio n. 2
0
        public void Connect()
        {
            try
            {
                IrcClientConnectionOptions options = null;

                if (Settings.Current.IRC.Ssl)
                {
                    options = new IrcClientConnectionOptions
                    {
                        Ssl         = true,
                        SslHostname = Settings.Current.IRC.Server
                    };

                    if (Settings.Current.IRC.SslAcceptInvalid)
                    {
                        options.SslCertificateValidationCallback = (sender, certificate, chain, policyErrors) => true;
                    }
                }

                Client.Connect(Settings.Current.IRC.Server, Settings.Current.IRC.Port, options);
            }
            catch (Exception e)
            {
                ErrorReporter.Notify("IRC", e);
            }
        }
Esempio n. 3
0
        public void Connect()
        {
            try
            {
                IrcClientConnectionOptions options = null;

                if (Settings.Current.IRC.Ssl)
                {
                    options             = new IrcClientConnectionOptions();
                    options.Ssl         = true;
                    options.SslHostname = Settings.Current.IRC.Server;

                    if (Settings.Current.IRC.SslAcceptInvalid)
                    {
                        options.SslCertificateValidationCallback = (sender, certificate, chain, policyErrors) => true;
                    }
                }

                Client.Connect(Settings.Current.IRC.Server, Settings.Current.IRC.Port, options);
            }
            catch (Exception e)
            {
                Log.WriteError("IRC", "Failed to connect: {0}\n{1}", e.Message, e.StackTrace);
            }
        }
Esempio n. 4
0
        public void Connect()
        {
            TrueNickname = Settings.Nickname;

            var options = new IrcClientConnectionOptions();

            options.SynchronizationContext = SynchronizationContext.Current;

            Client.Connect(Settings.Server, Settings.Port, options);
        }
Esempio n. 5
0
        public void Connect()
        {
            try
            {
                IrcClientConnectionOptions options = null;

                if (Settings.Current.IRC.Ssl)
                {
                    options = new IrcClientConnectionOptions
                    {
                        Ssl         = true,
                        SslHostname = Settings.Current.IRC.Server
                    };
                }

                Client.Connect(Settings.Current.IRC.Server, Settings.Current.IRC.Port, options);
            }
            catch (Exception e)
            {
                ErrorReporter.Notify("IRC", e);
            }
        }