Skip to content

config,irckit: add per-bridge DisableAway option to ignore /AWAY - #1193

Merged
hloeung merged 2 commits into
42wim:masterfrom
hloeung:disable-away
Dec 2, 2026
Merged

hloeung merged 2 commits into
42wim:masterfrom
hloeung:disable-away

Conversation

@hloeung

@hloeung hloeung commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a per-bridge DisableAway boolean option (default false, hot-reloadable) to config.BridgeConfig so users can ignore IRC /AWAY commands on specific bridges (e.g. [googlechat], [mastodon], or any future bridge) without affecting other bridges.

Changes

  • config/config.go: Adds DisableAway to BridgeConfig and loads <section>.DisableAway in buildBridgeConfig.
  • mm-go-irckit/server_commands.go (CmdAway): When u.br.BridgeConfig().DisableAway is true, returns standard RPL_NOWAWAY / RPL_UNAWAY to the IRC client without calling u.br.SetStatus or mutating u.away.

Testing

  • make build
  • golangci-lint run (0 issues)
  • go test -mod=vendor ./...

Add DisableAway (default false) to BridgeConfig so individual bridges
(such as Google Chat or Mastodon) can opt out of forwarding IRC /AWAY
commands to SetStatus on the remote platform while still returning
standard RPL_NOWAWAY / RPL_UNAWAY replies to the IRC client.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new DisableAway behavior lacks tests for both /AWAY forms, leaving backend updates and local state mutation vulnerable to regression.

1 open issue
What changed in this PR

Adds a hot-reloadable per-bridge DisableAway option that acknowledges IRC /AWAY commands without changing bridge or IRC away status.

Changes:

  • Adds and loads DisableAway in BridgeConfig.
  • Bypasses away-state mutation and backend status updates when enabled.
File Description
mm-go-irckit/​server_commands.go Handles /AWAY acknowledgements without mutating away status when the option is enabled.
config/​config.go Defines and loads the per-bridge DisableAway configuration option.

Review effort: Lite

Comment thread mm-go-irckit/server_commands.go Resolved
@hloeung
hloeung merged commit 2be8bad into 42wim:master Dec 2, 2026
4 checks passed
@hloeung
hloeung deleted the disable-away branch December 2, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants