From 89adf128523abbb57c2fd7f964115fec01bc00c0 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 2 Oct 2006 17:14:41 +0000 Subject: Seems to work now git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5400 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 5 +++-- src/modules/m_spanningtree.cpp | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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 &result) { + int n = 0; result.clear(); result.push_back(adding ? "+" : "-"); @@ -348,8 +349,8 @@ int irc::modestacker::GetStackedLine(std::deque &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); -- cgit v1.2.3