mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
feat: Implement IRC Gateway Service and related functionality
- Add IrcGatewayService to handle IRC connections and commands. - Create IrcMessage class for parsing IRC protocol lines. - Implement IrcMessageFormatter for formatting messages as IRC lines. - Define IrcNumericReply constants for IRC numeric replies. - Add IrcOptions class for configuration settings related to IRC. - Create IrcServiceExtensions for adding IRC services to the application. - Refactor ChannelsController to use IChatService for broadcasting messages and channel updates. - Update ChatHub to utilize IChatService for user connection and message handling. - Introduce ChatService to manage chat-related operations and interactions. - Implement SignalRBroadcaster for broadcasting messages to SignalR clients. - Update PresenceTracker to retrieve usernames for connections. - Modify appsettings.example.json to include IRC configuration options. - Update solution file to include the new IRC project.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
using System.Text;
|
||||
using System.Threading.RateLimiting;
|
||||
using EchoHub.Core.Constants;
|
||||
using EchoHub.Core.Contracts;
|
||||
using EchoHub.Core.Models;
|
||||
using EchoHub.Server.Auth;
|
||||
using EchoHub.Server.Data;
|
||||
using EchoHub.Server.Hubs;
|
||||
using EchoHub.Server.Irc;
|
||||
using EchoHub.Server.Services;
|
||||
using EchoHub.Server.Setup;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
@@ -101,6 +103,14 @@ while (true)
|
||||
builder.Services.AddSingleton<ImageToAsciiService>();
|
||||
builder.Services.AddSingleton<FileStorageService>();
|
||||
builder.Services.AddHostedService<ServerDirectoryService>();
|
||||
|
||||
// ── Chat Service + Broadcasters ─────────────────────────────────────
|
||||
builder.Services.AddSingleton<IChatBroadcaster, SignalRBroadcaster>();
|
||||
builder.Services.AddSingleton<IChatService, ChatService>();
|
||||
|
||||
// ── IRC Gateway (optional) ──────────────────────────────────────────
|
||||
builder.AddIrcGateway();
|
||||
|
||||
builder.Services.AddHttpClient("ImageDownload", client =>
|
||||
{
|
||||
client.Timeout = TimeSpan.FromSeconds(15);
|
||||
|
||||
Reference in New Issue
Block a user