diff options
Diffstat (limited to 'src/modules/m_spanningtree/treesocket2.cpp')
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index b117ebe82..bc9388c94 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -38,7 +38,7 @@ void TreeSocket::WriteLine(std::string line) /* Handle ERROR command */ -bool TreeSocket::Error(std::deque<std::string> ¶ms) +bool TreeSocket::Error(parameterlist ¶ms) { if (params.size() < 1) return false; @@ -47,7 +47,7 @@ bool TreeSocket::Error(std::deque<std::string> ¶ms) return false; } -void TreeSocket::Split(const std::string &line, std::deque<std::string> &n) +void TreeSocket::Split(const std::string &line, parameterlist &n) { n.clear(); irc::tokenstream tokens(line); @@ -61,7 +61,7 @@ void TreeSocket::Split(const std::string &line, std::deque<std::string> &n) bool TreeSocket::ProcessLine(std::string &line) { - std::deque<std::string> params; + parameterlist params; irc::string command; std::string prefix; @@ -80,17 +80,20 @@ bool TreeSocket::ProcessLine(std::string &line) if ((params[0][0] == ':') && (params.size() > 1)) { prefix = params[0].substr(1); - params.pop_front(); if (prefix.empty()) { this->SendError("BUG (?) Empty prefix recieved: " + line); return false; } + command = params[1].c_str(); + params.erase(params.begin(), params.begin() + 2); + } + else + { + command = params[0].c_str(); + params.erase(params.begin()); } - - command = params[0].c_str(); - params.pop_front(); switch (this->LinkState) { |