https://github.com/nowalone/ircnet
IRC (Internet Relay Chat) parser and chat client for .NET
https://github.com/nowalone/ircnet
csharp dotnet irc irc-client irc-protocol ircv3
Last synced: 3 months ago
JSON representation
IRC (Internet Relay Chat) parser and chat client for .NET
- Host: GitHub
- URL: https://github.com/nowalone/ircnet
- Owner: NowaLone
- License: mit
- Created: 2025-01-04T13:13:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-26T15:54:13.000Z (over 1 year ago)
- Last Synced: 2025-03-24T17:01:42.959Z (about 1 year ago)
- Topics: csharp, dotnet, irc, irc-client, irc-protocol, ircv3
- Language: C#
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# IrcNet
IrcNet is a comprehensive library for building IRC (Internet Relay Chat) clients. It includes abstractions, parsers, and extensions for both RFC 1459 and IRCv3 specifications.
## Download
[](https://www.nuget.org/packages/NowaLone.IrcNet.Abstractions)
[](https://www.nuget.org/packages/NowaLone.IrcNet.Client)
[](https://www.nuget.org/packages/NowaLone.IrcNet.Client.Rfc1459.Extensions)
[](https://www.nuget.org/packages/NowaLone.IrcNet.Client.V3.Extensions)
[](https://www.nuget.org/packages/NowaLone.IrcNet.Parser.Rfc1459)
[](https://www.nuget.org/packages/NowaLone.IrcNet.Parser.V3)
## Projects
### IrcNet.Abstractions
This project contains abstractions for IRC functionality, providing interfaces and base classes for building IRC clients.
### IrcNet.Parser.Rfc1459
A library for parsing IRC messages according to the RFC 1459 specifications.
### IrcNet.Parser.V3
A library for parsing IRC messages according to the IRCv3 specifications.
### IrcNet.Client
A core library for building IRC clients.
### IrcNet.Client.Extensions.Core
This package contains core extensions for the IrcNet.Client library.
### IrcNet.Client.Rfc1459.Extensions
This package contains extensions for the IrcNet.Client library, implementing RFC 1459.
### IrcNet.Client.V3.Extensions
This package contains extensions for the IrcNet.Client library, implementing IRCv3 specifications.
## Tests
### IrcNet.Parser.Rfc1459.Tests
Unit tests for the IrcNet.Parser.Rfc1459 library.
### IrcNet.Parser.V3.Tests
Unit tests for the IrcNet.Parser.V3 library.
## Getting Started
### Prerequisites
- .NET Framework 4.6.1 or higher
- .NET Core 3.0 or higher
- .NET 6 or higher
- .NET Standard 2.0 or higher
### Installation
Clone the repository:
```shell
git clone https://github.com/NowaLone/IrcNet.git
```
### Building the Solution
Navigate to the solution directory and build the projects using the .NET CLI:
```shell
dotnet build
```
### Running Tests
To run the tests, use the .NET CLI:
```shell
dotnet test
```
## Usage Example
Here's a simple example of how to use the IrcNet library to connect to an IRC server and join a channel:
```csharp
using IrcNet.Client;
using System;
using System.Text;
using System.Threading.Tasks;
using static IrcNet.Client.IrcClientWebSocket;
internal class Program
{
private static async Task Main(string[] args)
{
var options = new Options() { Uri = new Uri("irc.example.com:6667"), PingDelay = TimeSpan.FromSeconds(1) };
var client = new IrcClientWebSocket(options);
await client.OpenAsync();
client.OnMessageReceived += (sender, message) =>
{
Console.WriteLine($"Received: {message}");
};
await client.SendAsync(Encoding.UTF8.GetBytes($"PRIVMSG test"));
await Task.Delay(3000);
await client.CloseAsync();
}
}
```
## Acknowledgements
- [RFC 1459](https://tools.ietf.org/html/rfc1459)
- [RFC 2812](https://tools.ietf.org/html/rfc2812)
- [IRCv3 Working Group](https://ircv3.net/)