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); } }
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); } }
public void Connect() { TrueNickname = Settings.Nickname; var options = new IrcClientConnectionOptions(); options.SynchronizationContext = SynchronizationContext.Current; Client.Connect(Settings.Server, Settings.Port, options); }
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); } }