From 9ded26fce8e8cc6d6dcc029f038f4395656371b0 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 16 Sep 2021 14:19:48 +0100 Subject: Fix customprefix allowing mode names that contain spaces. --- src/modules/m_customprefix.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules/m_customprefix.cpp') diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index 53b0376b2..b71fd47b4 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -57,6 +57,9 @@ class ModuleCustomPrefix : public Module if (name.empty()) throw ModuleException(" must be specified at " + tag->getTagLocation()); + if (name.find(' ') != std::string::npos) + throw ModuleException(" must not contain spaces at " + tag->getTagLocation()); + if (tag->getBool("change")) { ModeHandler* mh = ServerInstance->Modes->FindMode(name, MODETYPE_CHANNEL); -- cgit v1.3.1-10-gc9f91