diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-23 18:06:26 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-23 18:06:26 +0000 |
commit | deb85740798d3438563628736c0e83edb6966b6e (patch) | |
tree | a8ad119fa9d1624a174cded210aba05a1af36173 /src/modules/m_spanningtree | |
parent | 3f3d3d302899aacf8b49fcc871265c965d1fb0fc (diff) |
Add some stuff to change how we process a token sepeperated stream
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7800 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index c939f2349..2b4b6d301 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -341,9 +341,9 @@ void TreeSocket::SendCapabilities() this->WriteLine("CAPAB START"); /* Send module names, split at 509 length */ - std::string item = "*"; + std::string item; std::string line = "CAPAB MODULES "; - while ((item = modulelist.GetToken()) != "") + while (modulelist.GetToken(item)) { if (line.length() + item.length() + 1 > 509) { @@ -384,8 +384,9 @@ void TreeSocket::SendCapabilities() bool TreeSocket::HasItem(const std::string &list, const std::string &item) { irc::commasepstream seplist(list); - std::string item2 = "*"; - while ((item2 = seplist.GetToken()) != "") + std::string item2; + + while (seplist.GetToken(item2)) { if (item2 == item) return true; @@ -397,9 +398,9 @@ bool TreeSocket::HasItem(const std::string &list, const std::string &item) std::string TreeSocket::ListDifference(const std::string &one, const std::string &two) { irc::commasepstream list_one(one); - std::string item = "*"; + std::string item; std::string result; - while ((item = list_one.GetToken()) != "") + while (list_one.GetToken(item)) { if (!HasItem(two, item)) { |