Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/store/handlers/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,16 @@ export function registerChannelHandlers(store: StoreApi<AppState>): void {
});

ircClient.on("RPL_YOURHOST", ({ serverId, serverName, version }) => {
// Check if the server is running UnrealIRCd
const isUnrealIRCd = version.includes("UnrealIRCd");
// The `isUnrealIRCd` flag gates UI surfaces that lean on the
// UnrealIRCd module-driven chanmode set (the "Advanced" tab in
// ChannelSettingsModal, etc.). ObbyIRCd is a downstream fork that
// advertises its own name in 002 but inherits that chanmode set,
// so it satisfies the same UI gate. Any features ObbyIRCd adds on
// top (e.g. named-modes) are detected separately through their
// own caps and shouldn't be conflated with UnrealIRCd parity.
const isUnrealIRCd =
version.includes("UnrealIRCd") || version.includes("ObbyIRCd");

// Update the server with the UnrealIRCd information
store.setState((state) => ({
servers: state.servers.map((server) =>
server.id === serverId ? { ...server, isUnrealIRCd } : server,
Expand Down
Loading