diff options
author | Sadie Powell <sadie@witchery.services> | 2022-12-31 22:10:37 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2022-12-31 22:11:19 +0000 |
commit | 885462d98e2dd3753b2992ce6fd6084340f86eee (patch) | |
tree | 2a933e4b12db31e1061b1814048c1fbbe4c30cad /src/config.cpp | |
parent | 6395107be630b0a4181d68eb5b55b69493af5bb7 (diff) | |
parent | 33a337dfc051222041896ec3ac349fd2f4821777 (diff) |
Merge branch '2.0' into 2.1.
Diffstat (limited to 'src/config.cpp')
-rw-r--r-- | src/config.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config.cpp b/src/config.cpp index 37ebe08ca..dc8586d46 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1,6 +1,6 @@ /* Configuration file handling. * - * (C) 2003-2022 Anope Team + * (C) 2003-2023 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. @@ -80,13 +80,13 @@ template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) c static void ValidateNotEmpty(const Anope::string &block, const Anope::string &name, const Anope::string &value) { if (value.empty()) - throw ConfigException("The value for <" + block + ":" + name + "> cannot be empty!"); + throw ConfigException("The value for <" + block + ":" + name + "> (" + value + ") cannot be empty!"); } static void ValidateNoSpaces(const Anope::string &block, const Anope::string &name, const Anope::string &value) { if (value.find(' ') != Anope::string::npos) - throw ConfigException("The value for <" + block + ":" + name + "> may not contain spaces!"); + throw ConfigException("The value for <" + block + ":" + name + "> (" + value + ") may not contain spaces!"); } static void ValidateNotEmptyOrSpaces(const Anope::string &block, const Anope::string &name, const Anope::string &value) @@ -471,7 +471,7 @@ Conf::Conf() : Block(""), EmptyBlock("") bool hide = fantasy->Get<bool>("hide"), prepend_channel = fantasy->Get<bool>("prepend_channel", "yes"); - ValidateNotEmptyOrSpaces("fantasy", "name", nname); + ValidateNotEmpty("fantasy", "name", nname); ValidateNotEmptyOrSpaces("fantasy", "command", service); CommandInfo &c = this->Fantasy[nname]; |