diff options
author | Peter Powell <petpow@saberuk.com> | 2013-05-17 01:34:25 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-06-06 00:41:07 +0100 |
commit | 047e29179766076146e7bd6126a883f4f3c95150 (patch) | |
tree | e3a5d78b9aaf4631ce0bbd6b46704ff00e8bb5a3 /src | |
parent | 7dfcffd6853547eb2e73d161916d5a289069baf2 (diff) |
Reserve ServerLimits::MaxLine instead of MAXBUF.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_ldapauth.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_alias.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp index 2d1551b43..ebfefd02b 100644 --- a/src/modules/extra/m_ldapauth.cpp +++ b/src/modules/extra/m_ldapauth.cpp @@ -212,7 +212,7 @@ public: std::string> &replacements) { std::string result; - result.reserve(MAXBUF); + result.reserve(ServerInstance->Config->Limits.MaxLine); for (unsigned int i = 0; i < text.length(); ++i) { char c = text[i]; diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 118cedeea..7e15b8c04 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -309,7 +309,7 @@ class ModuleAlias : public Module void DoCommand(const std::string& newline, User* user, Channel *chan, const std::string &original_line) { std::string result; - result.reserve(MAXBUF); + result.reserve(ServerInstance->Config->Limits.MaxLine); for (unsigned int i = 0; i < newline.length(); i++) { char c = newline[i]; diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 157679ed7..47c5ad6e1 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -197,7 +197,7 @@ void SpanningTreeUtilities::GetListOfServersForChannel(Channel* c, TreeServerLis std::string SpanningTreeUtilities::ConstructLine(const std::string& prefix, const std::string& command, const parameterlist& params) { std::string FullLine; - FullLine.reserve(MAXBUF); + FullLine.reserve(ServerInstance->Config->Limits.MaxLine); FullLine = ":" + prefix + " " + command; for (parameterlist::const_iterator x = params.begin(); x != params.end(); ++x) { diff --git a/src/users.cpp b/src/users.cpp index 44834330b..656d260e1 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -428,7 +428,7 @@ void UserIOHandler::OnDataReady() while (user->CommandFloodPenalty < penaltymax && getSendQSize() < sendqmax) { std::string line; - line.reserve(MAXBUF); + line.reserve(ServerInstance->Config->Limits.MaxLine); std::string::size_type qpos = 0; while (qpos < recvq.length()) { |