From 184350ff4a0c4f3aa3d5557eaa7b60fdf5b3e116 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 4 Oct 2024 13:23:50 +0100 Subject: [PATCH] Fix extracting the mode parameters from MODE on UnrealIRCd. --- modules/protocol/unrealircd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/protocol/unrealircd.cpp b/modules/protocol/unrealircd.cpp index 674ba6f82..ae87e0c34 100644 --- a/modules/protocol/unrealircd.cpp +++ b/modules/protocol/unrealircd.cpp @@ -1128,7 +1128,7 @@ struct IRCDMessageMode final void Run(MessageSource &source, const std::vector ¶ms, const Anope::map &tags) override { auto final_is_ts = server_ts && source.GetServer() != NULL; - auto last_param = params.end() - (final_is_ts ? 1 : 0); + auto last_param = params.end() - (params.size() > 3 && final_is_ts ? 1 : 0); if (IRCD->IsChannelValid(params[0])) {