From 5870145ac255da65f5bf4ff0fae4715cbb930ec9 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 2 Apr 2007 22:11:14 +0000 Subject: This needs some general QA-ing. Add support to new parser (introduced in 1.1) for empty final params (just the colon) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6731 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_spanningtree/treesocket1.cpp') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 2ead91c8e..20943ef26 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -356,8 +356,9 @@ bool TreeSocket::Capab(const std::deque ¶ms) else if ((params[0] == "CAPABILITIES") && (params.size() == 2)) { irc::tokenstream capabs(params[1]); - std::string item = "*"; - while ((item = capabs.GetToken()) != "") + std::string item; + bool more = true; + while ((more = capabs.GetToken(item))) { /* Process each key/value pair */ std::string::size_type equals = item.rfind('='); @@ -678,13 +679,12 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque &p } /* Put the final parameter of the FJOIN into a tokenstream ready to split it */ irc::tokenstream users(nicklist); - std::string item = "*"; + std::string item; /* Now, process every 'prefixes,nick' pair */ - while (item != "") + while (users.GetToken(item)) { /* Find next user */ - item = users.GetToken(); const char* usr = item.c_str(); /* Safety check just to make sure someones not sent us an FJOIN full of spaces * (is this even possible?) */ -- cgit v1.2.3