feat: multi-network namespace multiplexing

Multiplex all networks onto a single client connection using /network
suffixes on channels and nicks. PASS is now just the password (no
network prefix). Channels appear as #channel/network, foreign nicks as
nick/network, own nicks stay bare.

New namespace.py module with pure encode/decode functions. Router
tracks clients globally (not per-network), namespaces messages before
delivery. Client attaches to all networks on connect, sends synthetic
JOIN/TOPIC/NAMES for every channel across all networks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-20 19:03:58 +01:00
parent ab7603f638
commit 8cc57a7af4
13 changed files with 512 additions and 131 deletions

View File

@@ -97,6 +97,19 @@ password = "x"
with pytest.raises(ValueError, match="at least one network"):
load(_write_config(config))
def test_slash_in_network_name_raises(self):
config = """\
[bouncer]
password = "x"
[proxy]
[networks."lib/era"]
host = "irc.example.com"
"""
with pytest.raises(ValueError, match="must not contain '/'"):
load(_write_config(config))
def test_tls_default_port(self):
config = """\
[bouncer]