summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-08-10 09:04:30 +0100
committerPeter Powell <petpow@saberuk.com>2018-08-10 20:04:56 +0100
commit02838a09396a3626b61263791570e96324563fa0 (patch)
tree2978bacea011256f66f799bf5b8f91dc8590a398 /src/hashcomp.cpp
parent8b418f081f7ecbfdd51c84fae2298f927155fac0 (diff)
Move message parsing to ProcessBuffer and fix edge cases in it.
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r--src/hashcomp.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 47c36b91b..8febcbb5f 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -212,7 +212,7 @@ bool irc::tokenstream::GetMiddle(std::string& token)
size_t separator = message.find(' ', position);
if (separator == std::string::npos)
{
- token.assign(message, position);
+ token.assign(message, position, std::string::npos);
position = message.length();
return true;
}
@@ -234,9 +234,8 @@ bool irc::tokenstream::GetTrailing(std::string& token)
// If this is true then we have a <trailing> token!
if (message[position] == ':')
{
- token.assign(message, position + 1);
+ token.assign(message, position + 1, std::string::npos);
position = message.length();
- ServerInstance->Logs->Log("HASHCOMP", LOG_DEBUG, "TRAILING %s next (none)", token.c_str());
return true;
}