NetIRC

The event-driven IRC library for .NET

View project onGitHub

NetIRC was created for those interested in creating a bot or client for IRC but did not want to go through the long process of parsing and sending their own data.

Why use NetIRC?

The majority of IRC libraries out there for .NET are either made to complete simple tasks, or contain just enough features so the author could do what they needed. None of them seem to be flexible enough to handle custom messages or send custom messages, and that is exactly why NetIRC was written. NetIRC was written to be extremely flexible, to the point where everything can be swapped out as needed and new messages can be added as long as they meet the requirements.

So this is an IRC client?

NetIRC was created as a framework for interfacing with IRC. This means that it can be used to create an IRC client, but it doesn't provide that functionality for you by default.

How do I actually use this?

Once you download the source code, you can build NetIRC as a library or you can grab a copy of NetIRC as a compiled library. NetIRC is built on the .NET Framework 4.5, but it should be able to support at least .NET Framework 4.

  1. Create a new project in Visual Studio and add NetIRC as a reference.
  2. Import NetIRC in the file you need it in.
  3. Create a Client object, which is a god object that contains all of the references you will need.

    Client client = new Client();
    client.Connect(server, port, ssl?, nick);
    
  4. Join channels and register your event handlers

    client.JoinChannel("channel");
    client.Channels["channel"].OnJoin += (c, u) => 
    {
    Console.WriteLine(u.NickName + " joined " + c.Name);
    };
    
  5. Profit!!!

I love this, how can I contribute?

We can all wish people said that, right? I'll accept pull requests that have a purpose at the pull request page.