Connect to an IRC server
To connect to an IRC server, you'll need to provide a User and IConnection to instantiate a new IrcClient.
The user object can be created with a nick and an optional real name.
var user = new User("myBot", "Fun Bot");
For the connection, you'll want to use a TcpClientConnection.
var conn = new TcpClientConnection();
Once you have those ready, you can create your client and connect. You'll need to specify and address and port when connecting.
var client = new IrcClient(user, conn);
await client.ConnectAsync("irc.mysite.com", 6667);
The client will automatically send PASS
, NICK
, and USER
messages to the server once connected.