aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_customprefix.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-09-16 15:49:00 +0100
committerGravatar Sadie Powell2021-09-16 15:50:00 +0100
commit2f462a6098a91634c354a25e6352667a953acfd4 (patch)
tree8ea03c67eda9560a93412120e128b8ed44462c96 /src/modules/m_customprefix.cpp
parentAlways use ExtractTS to extract timestamps from S2S messages. (diff)
parentFix customprefix allowing mode names that contain spaces. (diff)
Merge branch 'insp3' into master.
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 487b71060..f9b88ad9a 100644
--- a/src/modules/m_customprefix.cpp
+++ b/src/modules/m_customprefix.cpp
@@ -61,6 +61,9 @@ class ModuleCustomPrefix : public Module
if (name.empty())
throw ModuleException("<customprefix:name> must be specified at " + tag->source.str());
+ if (name.find(' ') != std::string::npos)
+ throw ModuleException("<customprefix:name> must not contain spaces at " + tag->source.str());
+
if (tag->getBool("change"))
{
ModeHandler* mh = ServerInstance->Modes.FindMode(name, MODETYPE_CHANNEL);