aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_customprefix.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-09-16 14:19:48 +0100
committerGravatar Sadie Powell2021-09-16 14:19:48 +0100
commit9ded26fce8e8cc6d6dcc029f038f4395656371b0 (patch)
treef7d4c30eedb914f60bfeba3443d97600913cb902 /src/modules/m_customprefix.cpp
parentFix ssl_openssl on a broken fork of OpenSSL. (diff)
Fix customprefix allowing mode names that contain spaces.
Diffstat (limited to 'src/modules/m_customprefix.cpp')
-rw-r--r--src/modules/m_customprefix.cpp3
1 files changed, 3 insertions, 0 deletions
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("<customprefix:name> must be specified at " + tag->getTagLocation());
+ if (name.find(' ') != std::string::npos)
+ throw ModuleException("<customprefix:name> must not contain spaces at " + tag->getTagLocation());
+
if (tag->getBool("change"))
{
ModeHandler* mh = ServerInstance->Modes->FindMode(name, MODETYPE_CHANNEL);