From 3bd512df63f7fa81fcdad57b22ea4fc79fe56097 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 26 Jun 2019 19:02:51 +0100 Subject: Only show UHNAMES and NAMESX in 005 if the cap module is loaded. The legacy method of enabling these extensions is just a wrapper around the capability. If the cap module is not loaded it can not be enabled so we should not advertise it. --- src/modules/m_namesx.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/modules/m_namesx.cpp') diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 2b4fd87b4..d91b6b050 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -48,7 +48,10 @@ class ModuleNamesX void On005Numeric(std::map& tokens) CXX11_OVERRIDE { - tokens["NAMESX"]; + // The legacy PROTOCTL system is a wrapper around the cap. + dynamic_reference_nocheck capmanager(this, "capmanager"); + if (capmanager) + tokens["NAMESX"]; } ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) CXX11_OVERRIDE -- cgit v1.3.1-10-gc9f91