diff --git a/CHANGELOG.md b/CHANGELOG.md index 92a62bd..75f9035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ This project follows the versioning policy in VERSIONING.md. +## 0.1.3 - 2026-01-05 + +- Added `/list` command to discover registered public rooms with their topics (available to all users) +- Added `+p` (private) channel mode to hide rooms from `/list` and `/who` commands +- Private rooms are only visible in `/who` to server operators +- Updated mode handling to support `+p`/`-p` flags and persist private status to room registry +- Consolidated version number to single source in `rrcd/__init__.py` (pyproject.toml now reads it dynamically) +- Documentation updates for new command and mode in README.md and EX1-RRCD.md + + ## 0.1.2 - 2026-01-01 - Implemented RNS.Resource transfer for messages exceeding MTU limits, with resource envelope handling and automatic fallback diff --git a/EX1-RRCD.md b/EX1-RRCD.md index b8237ec..ddcb341 100644 --- a/EX1-RRCD.md +++ b/EX1-RRCD.md @@ -180,8 +180,11 @@ These work from any room (or no room): - `/reload`: Reload hub configuration (server operator only) - `/stats`: Display hub statistics (server operator only) -- `/who [room]`: List members in a room +- `/who [room]`: List members in a room. Private rooms (`+p`) are hidden from + non-operators. - `/names [room]`: Alias for `/who` +- `/list`: List all registered public rooms with their topics. Excludes private + rooms (`+p`) and ephemeral (non-registered) rooms. ### Room Management Commands @@ -218,6 +221,8 @@ IRC-style mode flags (set via `/mode `): - `+i` / `-i`: Invite-only (must be invited to join) - `+t` / `-t`: Topic protected (only operators can set topic) - `+n` / `-n`: No outside messages (must be in room to send messages) +- `+p` / `-p`: Private room (hidden from `/list` command and `/who` for + non-operators) - `+k ` / `-k`: Room key/password (must provide key to join) - `+r` / `-r`: Registered room (read-only; use `/register` or `/unregister`) - `+o ` / `-o `: Grant/remove operator status diff --git a/README.md b/README.md index 76b6e82..eae9a4d 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,8 @@ Server operator commands (require identity in `trusted_identities`): - `/stats` — show hub stats (uptime, clients, rooms, counters) - `/reload` — reload `rrcd.toml` and `rooms.toml` from disk -- `/who [room]` — list members (nick and/or hash prefix) +- `/who [room]` — list members (nick and/or hash prefix); private rooms (`+p`) + are hidden from non-operators - `/kline add ` — add a server-global ban (persists to `banned_identities`) - `/kline del ` — remove a server-global ban (persists to @@ -207,7 +208,8 @@ server operators): - `/mode (+m|-m)` — set moderated mode - `/mode (+i|-i)` — set invite-only mode - `/mode (+k|-k) [key]` — set/clear room key (password) -- `/mode (+p|-p)` — set/clear private mode (room hidden from `/list`) +- `/mode (+p|-p)` — set/clear private mode (room hidden from `/list` and + `/who` for non-operators) - `/mode (+t|-t)` — set topic-ops-only (only ops can change topic) - `/mode (+n|-n)` — set no-outside-messages - `/mode (+r|-r)` — read-only; use /register or /unregister diff --git a/pyproject.toml b/pyproject.toml index 67e2c0a..809de57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rrcd" -version = "0.1.2" +dynamic = ["version"] description = "Reticulum Relay Chat daemon (hub service)" readme = "README.md" license = { file = "LICENSE" } @@ -44,6 +44,9 @@ rrcd = "rrcd.cli:main" [tool.setuptools] packages = ["rrcd"] +[tool.setuptools.dynamic] +version = {attr = "rrcd.__version__"} + [tool.ruff] target-version = "py311" line-length = 88 diff --git a/rrcd/__init__.py b/rrcd/__init__.py index fd9a4ec..d4516cb 100644 --- a/rrcd/__init__.py +++ b/rrcd/__init__.py @@ -1,3 +1,3 @@ __all__ = ["__version__"] -__version__ = "0.1.1" +__version__ = "0.1.3" diff --git a/rrcd/service.py b/rrcd/service.py index 0514234..6e970c8 100644 --- a/rrcd/service.py +++ b/rrcd/service.py @@ -2102,6 +2102,13 @@ class HubService: self._emit_notice(outgoing, link, None, f"bad room: {e}") return True + # Check if room is private - only server operators can see private rooms + st = self._room_state_get(r) + if st and st.get("private"): + if not self._is_server_op(peer_hash): + self._emit_notice(outgoing, link, None, f"room {r} is private") + return True + members = [] for other in sorted(self.rooms.get(r, set()), key=lambda x: id(x)): s = self.sessions.get(other)