public IrcClient(string serverAddress, IrcUser user) { if (serverAddress == null) throw new ArgumentNullException("serverAddress"); if (user == null) throw new ArgumentNullException("user"); User = user; ServerAddress = serverAddress; Encoding = Encoding.UTF8; Channels = new ChannelCollection(this); Settings = new ClientSettings(); Handlers = new Dictionary<string, MessageHandler>(); MessageHandlers.RegisterDefaultHandlers(this); RequestManager = new RequestManager(); }
public IrcClient(string serverAddress, IrcUser user, bool useSSL = false) { if (serverAddress == null) throw new ArgumentNullException("serverAddress"); if (user == null) throw new ArgumentNullException("user"); User = user; ServerAddress = serverAddress; Encoding = Encoding.UTF8; Channels = new ChannelCollection(this); Settings = new ClientSettings(); Handlers = new Dictionary<string, MessageHandler>(); MessageHandlers.RegisterDefaultHandlers(this); RequestManager = new RequestManager(); UseSSL = useSSL; WriteQueue = new ConcurrentQueue<string>(); PrivmsgPrefix = ""; }