c# irc library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ben Harris d83294c7bc s/freenode/libera/ 4 months ago
ChatSharp s/freenode/libera/ 4 months ago
ChatSharpTests .net 5.0 and apply formatting 4 months ago
.gitattributes Normalize line endings 7 years ago
.gitignore Add support for unusual channel prefixes 7 years ago
ChatSharp.sln s/freenode/libera/ 4 months ago
LICENSE Initial commit 9 years ago
README.md s/freenode/libera/ 4 months ago



A C# library for chatting on an IRC (Internet Relay Protocol) network.

Supports a lot of RFC 1459 and a little of 2812.

Example Usage

var client = new IrcClient("irc.libera.chat", new IrcUser("ChatSharp", "ChatSharp"));

client.ConnectionComplete += (s, e) => client.JoinChannel("#botwar");

client.ChannelMessageReceived += (s, e) =>
    var channel = client.Channels[e.PrivateMessage.Source];

    if (e.PrivateMessage.Message == ".list")
        channel.SendMessage(string.Join(", ", channel.Users.Select(u => u.Nick)));
    else if (e.PrivateMessage.Message.StartsWith(".ban "))
        if (!channel.UsersByMode['@'].Contains(client.User))
            channel.SendMessage("I'm not an op here!");
        var target = e.PrivateMessage.Message.Substring(5);
        client.WhoIs(target, whois => channel.ChangeMode("+b *!*@" + whois.User.Hostname));


while (true) ; // Waste CPU cycles


On Linux/Mac:

xbuild /p:Configuration=Release

On Windows, use Visual Studio or similar and build in Release mode.

Regardless of platform, you'll receive binaries in ChatSharp/bin/Release/. ChatSharp has no dependencies.


Open a Github issue describing your problem.

Development / Contributing

ChatSharp is developed with the following workflow:

  1. Nothing happens for weeks/months/years
  2. Someone needs it to do something it doesn't already do
  3. That person implements that something and submits a pull request
  4. Repeat

If it doesn't have a feature that you want it to have, add it! The code isn't that scary.