Server-side core functionality for Orion IRC Server
$ dotnet add package Orion.Core.Server
Server-side core functionality for the Orion IRC Server project.
IRC is not dead, long live IRC!
I'm looking for frontend developers interested in creating a modern web admin interface and web-based IRC client for Orion IRC Server. Experience with React desired!
If interested, please open an issue or contact us via GitHub.
Orion.Core.Server provides the essential server-side infrastructure for building a full-featured IRC server. This library includes services, interfaces, configuration handling, event dispatching, and the modular architecture that makes Orion IRC Server flexible and extensible.
dotnet add package Orion.Core.Server
a Or using the Package Manager Console:
Install-Package Orion.Core.Server
Orion.Core.Server is designed with a modular, service-oriented architecture:
using Orion.Core.Server.Extensions;
using Orion.Core.Server.Interfaces.Modules;
public class MyModule : IOrionContainerModule
{
public IServiceCollection RegisterServices(IServiceCollection services)
{
return services
.AddService<IMyService, MyService>()
.AddIrcCommand<MyCommand>();
}
}
using Orion.Core.Server.Interfaces.Services.Base;
public interface IMyService : IOrionService
{
Task DoSomethingAsync();
}
public class MyService : IMyService, IOrionStartService
{
private readonly ILogger _logger;
public MyService(ILogger<MyService> logger)
{
_logger = logger;
}
public Task DoSomethingAsync()
{
_logger.LogInformation("Doing something");
return Task.CompletedTask;
}
public Task StartAsync(CancellationToken cancellationToken = default)
{
_logger.LogInformation("Service starting");
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken = default)
{
_logger.LogInformation("Service stopping");
return Task.CompletedTask;
}
}
using HyperCube.Postman.Interfaces.Services;
using Orion.Core.Server.Events.Server;
// Publishing an event
await _hyperPostmanService.PublishAsync(new ServerReadyEvent());
// Subscribing to events
public class MyEventHandler : ILetterListener<ServerReadyEvent>
{
public async Task HandleAsync(ServerReadyEvent @event, CancellationToken cancellationToken = default)
{
// Handle the server ready event
}
}
using Orion.Core.Server.Data.Config.Base;
public class MyConfigSection : BaseConfigSection
{
public string Name { get; set; } = "Default";
public int SomeValue { get; set; } = 42;
public override void Load()
{
// Custom loading logic
}
}
This project is licensed under the MIT License - see the LICENSE file for details.