summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alias.cpp2
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp10
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 858a7883d..3893ad5bf 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -255,7 +255,7 @@ class ModuleAlias : public Module
const char* parv[127];
int x = 0;
- while ((pars[x] = ss.GetToken()) != "")
+ while (ss.GetToken(pars[x]))
{
parv[x] = pars[x].c_str();
x++;
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<std::string> &params)
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<std::string> &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?) */
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 0008c2691..52b31ec57 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -902,7 +902,7 @@ void TreeSocket::Split(const std::string &line, std::deque<std::string> &n)
n.clear();
irc::tokenstream tokens(line);
std::string param;
- while ((param = tokens.GetToken()) != "")
+ while (tokens.GetToken(param))
n.push_back(param);
return;
}