AbyssIrc.Server.Core 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package AbyssIrc.Server.Core --version 0.2.1
                    
NuGet\Install-Package AbyssIrc.Server.Core -Version 0.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AbyssIrc.Server.Core" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AbyssIrc.Server.Core" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="AbyssIrc.Server.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AbyssIrc.Server.Core --version 0.2.1
                    
#r "nuget: AbyssIrc.Server.Core, 0.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AbyssIrc.Server.Core@0.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AbyssIrc.Server.Core&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=AbyssIrc.Server.Core&version=0.2.1
                    
Install as a Cake Tool

AbyssIrc.Server.Core

NuGet License: MIT

Core server components and framework for the AbyssIrc server ecosystem.

Overview

AbyssIrc.Server.Core provides the fundamental server infrastructure for building a modular, extensible IRC server. This library sits between the low-level protocol implementation (AbyssIrc.Network) and the full server application, offering a robust framework for IRC server functionality while maintaining a clean separation of concerns.

Features

  • Service Layer: Core services for IRC server functionality
  • Session Management: User session creation, tracking, and lifecycle management
  • Command Handling: Framework for processing IRC commands and generating responses
  • Event System Integration: Server-specific events and handlers
  • Server Configuration: Server-specific configuration management
  • Template Processing: Server message template processing
  • Extension Framework: Pluggable architecture for extending server functionality

Installation

Via NuGet

# Install via .NET CLI
dotnet add package AbyssIrc.Server.Core

# Install via Package Manager
Install-Package AbyssIrc.Server.Core

Via PackageReference in .csproj


<ItemGroup>
  <PackageReference Include="AbyssIrc.Server.Core" Version="0.1.0"/>
</ItemGroup>

Usage Examples

Service Registration

// Register core IRC server services
services.AddSingleton<ISessionManagerService, SessionManagerService>();
services.AddSingleton<IIrcManagerService, IrcManagerService>();
services.AddSingleton<ITextTemplateService, TextTemplateService>();
services.AddSingleton<IStringMessageService, StringMessageService>();
services.AddSingleton<ISchedulerSystemService, SchedulerSystemService>();

Command Handlers

// Create a command handler
public class PingPongHandler : BaseHandler, IIrcMessageListener
{
    public PingPongHandler(ILogger<PingPongHandler> logger, IServiceProvider serviceProvider)
        : base(logger, serviceProvider)
    {
    }

    public Task OnMessageReceivedAsync(string id, IIrcCommand command)
    {
        return command switch
        {
            PingCommand pingCommand => HandlePingCommand(id, pingCommand),
            PongCommand pongCommand => HandlePongCommand(id, pongCommand),
            _ => Task.CompletedTask
        };
    }

    private async Task HandlePingCommand(string id, PingCommand pingCommand)
    {
        var session = GetSession(id);
        await SendIrcMessageAsync(id, new PongCommand(ServerData.Hostname, pingCommand.Token));
    }

    // Additional handler methods...
}

Session Management

// Using the session manager
public async Task ProcessNewConnection(string connectionId, string ipEndpoint)
{
    // Add a new session
    _sessionManagerService.AddSession(connectionId, ipEndpoint);

    // Get an existing session
    var session = _sessionManagerService.GetSession(connectionId);

    // Query sessions
    var operatorSessions = _sessionManagerService.GetSessions()
        .Where(s => s.IsOperator)
        .ToList();
}

Sending IRC Messages

// Send messages to clients
await SendIrcMessageAsync(
    sessionId,
    new RplWelcomeCommand(ServerData.Hostname, session.Nickname, "Welcome to the IRC network!")
);

await SendIrcMessageAsync(
    sessionId,
    new RplMotdStart.Create(ServerData.Hostname, session.Nickname)
);

foreach (var line in _motdLines)
{
    await SendIrcMessageAsync(
        sessionId,
        new RplMotd(ServerData.Hostname, session.Nickname, _textTemplateService.TranslateText(line))
    );
}

Service Interfaces

Key service interfaces that form the server's architecture:

  • ISessionManagerService: Manages user connections and sessions
  • IIrcManagerService: Core IRC command processing and dispatch
  • ITextTemplateService: Template processing for server messages
  • ISchedulerSystemService: Task scheduling for maintenance operations
  • IEventDispatcherService: Event routing and handling

Dependency on Other AbyssIrc Packages

AbyssIrc.Server.Core has the following dependencies:

  • AbyssIrc.Core: Fundamental types, utilities, and infrastructure
  • AbyssIrc.Network: IRC protocol implementation and command definitions

Requirements

  • .NET 9.0 or later
  • Compatible with Windows, Linux, and macOS

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! If you're interested in improving AbyssIrc.Server.Core:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

For more information on AbyssIrc and related projects, visit the AbyssIrc GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AbyssIrc.Server.Core:

Package Downloads
AbyssIrc.Server

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 49 10/22/2026
1.1.0 49 10/22/2026
1.0.0 84 10/20/2026
0.7.0 84 10/19/2026
0.6.1 95 10/19/2026
0.5.0 391 8/7/2025
0.2.4 307 4/14/2025
0.2.3 274 4/7/2025
0.2.2 209 4/5/2025
0.2.1 231 4/4/2025
0.2.0 228 4/4/2025
0.1.15 283 4/3/2025
0.1.14 277 4/3/2025
0.1.9 260 4/3/2025
0.1.8 270 4/3/2025
0.1.7 276 4/2/2025