summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hashcomp.cpp5
-rw-r--r--src/modules/m_spanningtree.cpp7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 4dd9050b4..2acd59f91 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -338,6 +338,7 @@ void irc::modestacker::PushMinus()
int irc::modestacker::GetStackedLine(std::deque<std::string> &result)
{
+ int n = 0;
result.clear();
result.push_back(adding ? "+" : "-");
@@ -348,8 +349,8 @@ int irc::modestacker::GetStackedLine(std::deque<std::string> &result)
result.push_back(sequence[1]);
sequence[0].erase(sequence[0].begin());
sequence.erase(sequence.begin() + 1);
+ n++;
}
- return result.size();
+ return n;
}
-
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index e410c5135..8503386a0 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2627,27 +2627,34 @@ class TreeSocket : public InspSocket
std::string modesequence = Instance->Modes->ModeString(i->second, c);
if (modesequence.length())
{
+ ServerInstance->Log(DEBUG,"Mode sequence = '%s'",modesequence.c_str());
irc::spacesepstream sep(modesequence);
std::string modeletters = sep.GetToken();
+ ServerInstance->Log(DEBUG,"Mode letters = '%s'",modeletters.c_str());
while (!modeletters.empty())
{
char mletter = *(modeletters.begin());
modestack.Push(mletter,sep.GetToken());
+ ServerInstance->Log(DEBUG,"Push letter = '%c'",mletter);
modeletters.erase(modeletters.begin());
+ ServerInstance->Log(DEBUG,"Mode letters = '%s'",modeletters.c_str());
}
}
}
while (modestack.GetStackedLine(stackresult))
{
+ ServerInstance->Log(DEBUG,"Stacked line size %d",stackresult.size());
stackresult.push_front(ConvToStr(c->age));
stackresult.push_front(c->name);
DoOneToMany(Instance->Config->ServerName, "FMODE", stackresult);
stackresult.erase(stackresult.begin() + 1);
+ ServerInstance->Log(DEBUG,"Stacked items:");
for (size_t z = 0; z < stackresult.size(); z++)
{
y[z] = stackresult[z].c_str();
+ ServerInstance->Log(DEBUG,"\tstackresult[%d]='%s'",z,stackresult[z].c_str());
}
userrec* n = new userrec(Instance);
n->SetFd(FD_MAGIC_NUMBER);