summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-08-17 14:54:49 +0100
committerPeter Powell <petpow@saberuk.com>2017-09-03 22:44:33 +0100
commitc0ca5c8d41a71eae4ec132e492b546fa03510871 (patch)
tree9200feea4cb083dad48ee3c167073421b695ff58 /src/modules
parente7c829af5941c6a8a303ca75ed9ac47570347e41 (diff)
Add support for length arguments in getString.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alias.cpp3
-rw-r--r--src/modules/m_operprefix.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 6d8e3a1c6..95667e7ed 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -73,8 +73,7 @@ class ModuleAlias : public Module
{
ConfigTag* fantasy = ServerInstance->Config->ConfValue("fantasy");
AllowBots = fantasy->getBool("allowbots", false);
- std::string fpre = fantasy->getString("prefix");
- fprefix = fpre.empty() ? "!" : fpre;
+ fprefix = fantasy->getString("prefix", "!", 1, ServerInstance->Config->Limits.MaxLine);
Aliases.clear();
ConfigTagList tags = ServerInstance->Config->ConfTags("alias");
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp
index b355047ee..73155b394 100644
--- a/src/modules/m_operprefix.cpp
+++ b/src/modules/m_operprefix.cpp
@@ -32,8 +32,7 @@ class OperPrefixMode : public PrefixMode
OperPrefixMode(Module* Creator)
: PrefixMode(Creator, "operprefix", 'y', OPERPREFIX_VALUE)
{
- std::string pfx = ServerInstance->Config->ConfValue("operprefix")->getString("prefix", "!");
- prefix = pfx.empty() ? '!' : pfx[0];
+ prefix = ServerInstance->Config->ConfValue("operprefix")->getString("prefix", "!", 1, 1)[0];
levelrequired = INT_MAX;
}
};