summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2026-04-26 17:59:08 -0300
committerEuAndreh <eu@euandre.org>2026-04-26 17:59:08 -0300
commit0af8e7415ec5b52bc08eb6fe6abbbeb4b9b207e0 (patch)
tree409ce7cc53551ddd082ea13380870e72079cc91b /src
parentHide +s/+p channels from LIST for non-members (diff)
downloadpapod-0af8e7415ec5b52bc08eb6fe6abbbeb4b9b207e0.tar.gz
papod-0af8e7415ec5b52bc08eb6fe6abbbeb4b9b207e0.tar.xz
Normalize channel handles to lowercase in JOIN
Joining #Foo and #foo now refer to the same channel, matching IRC casemapping (we advertise CASEMAPPING=ascii). The normalized name is what gets stored in the in-memory state and emitted in the JOIN broadcast.
Diffstat (limited to 'src')
-rw-r--r--src/papod.clj6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/papod.clj b/src/papod.clj
index 14957eb..d0c49cc 100644
--- a/src/papod.clj
+++ b/src/papod.clj
@@ -2170,8 +2170,10 @@
(defn- join-one!
([handle client components]
(join-one! handle nil client components))
- ([handle key-arg client components]
- (let [{:keys [conn clients channels]} components
+ ([raw-handle key-arg client components]
+ (let [handle (when raw-handle
+ (string/lower-case raw-handle))
+ {:keys [conn clients channels]} components
nick (client-target client)
modes (chan-modes-for components handle)
existing? (and channels (seq (get @channels handle)))