From 643b1b995679d9ea315d5767111f376c5af6c44b Mon Sep 17 00:00:00 2001 From: Nakidai Date: Sat, 7 Feb 2026 15:08:54 +0300 Subject: Refactor MODE MODE command is used to manage modes of both users and channels. But since these tasks are quite different it'd be nice to split them to not have an if statement whose both branches occupe whole function --- reply.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'reply.c') diff --git a/reply.c b/reply.c index c5609e9..04a00c2 100644 --- a/reply.c +++ b/reply.c @@ -263,6 +263,11 @@ vreply(const struct Peer *peer, int number, va_list ap) getnick(peer), *m ), m, _); + REPLY(502, WRITE( + ":%s 502 %s :Cannot change mode for other users", + hostname, + getnick(peer) + ), _); default: warn("unknown reply: %d", number); return WRITE( ":%s 421 %s err :Reply %d is not implemented yet", hostname, -- cgit 1.4.1