summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2026-04-24 17:05:47 -0300
committerEuAndreh <eu@euandre.org>2026-04-24 17:05:47 -0300
commit0ee68b8c6dda7b3e9af245127b0febb0cbb9862a (patch)
treecd702f5259798a0956f9fddf85ffe607e0c606db
parentFix JOIN crashes and support comma-separated channels (diff)
downloadpapod-0ee68b8c6dda7b3e9af245127b0febb0cbb9862a.tar.gz
papod-0ee68b8c6dda7b3e9af245127b0febb0cbb9862a.tar.xz
Fix KICK default reason and nonexistent channel error
- KICK with no comment uses kicker's nick as default reason (was incorrectly using target's nick) - KICK on nonexistent channel returns 403 ERR_NOSUCHCHANNEL (was returning 442 ERR_NOTONCHANNEL) irctest: 204 passed, 462 failed, 217 skipped. Unit: 207 assertions, Integration: 21 assertions — all pass.
-rw-r--r--src/papod.clj7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/papod.clj b/src/papod.clj
index de6dba3..50f31af 100644
--- a/src/papod.clj
+++ b/src/papod.clj
@@ -2363,12 +2363,17 @@
(let [r (string/join " " (drop 2 params))]
(cond-> r
(string/starts-with? r ":") (subs 1)))
- target)]
+ nick)]
(cond
(< (count params) 2)
[(numeric-reply client "461"
"KICK :Not enough parameters")]
+ ;; Channel doesn't exist
+ (nil? (get @channels handle))
+ [(numeric-reply client "403"
+ (str handle " :No such channel"))]
+
(not (contains? (get @channels handle) nick))
[(numeric-reply client "442"
(str handle " :You're not on that channel"))]