summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp13
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))
{