diff options
| author | 2021-09-16 14:19:48 +0100 | |
|---|---|---|
| committer | 2021-09-16 14:19:48 +0100 | |
| commit | 9ded26fce8e8cc6d6dcc029f038f4395656371b0 (patch) | |
| tree | f7d4c30eedb914f60bfeba3443d97600913cb902 /src/modules/m_customprefix.cpp | |
| parent | Fix 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.cpp | 3 |
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); |
