From b6bcdbfcd18e17852e50e246a3d7d65a0cb2dba4 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 1 Oct 2006 20:46:19 +0000 Subject: It all came down to a >1 where we needed a >0. Things should be stable now jamie git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5375 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 5 ++++- src/modules/m_spanningtree.cpp | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mode.cpp b/src/mode.cpp index ceb801c69..b2cdd9afe 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -269,7 +269,9 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool chanrec* targetchannel = ServerInstance->FindChan(parameters[0]); userrec* targetuser = ServerInstance->FindNick(parameters[0]); - ServerInstance->Log(DEBUG,"ModeParser::Process start"); + ServerInstance->Log(DEBUG,"ModeParser::Process start: pcnt=%d",pcnt); + for (int j = 0; j < pcnt; j++) + ServerInstance->Log(DEBUG," parameters[%d] = '%s'", j, parameters[j]); LastParse = ""; @@ -418,6 +420,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool /* This mode expects a parameter, do we have any parameters left in our list to use? */ if (parameter_counter < pcnt) { + ServerInstance->Log(DEBUG,"parameter_counter = %d, pcnt = %d", parameter_counter, pcnt); parameter = parameters[parameter_counter++]; /* Yerk, invalid! */ diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 2f4f0a801..0f6ee9836 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1309,7 +1309,7 @@ class TreeSocket : public InspSocket modelist[0] = params[0].c_str(); modelist[1] = to_keep.c_str(); - if (params_to_keep.size() > 1) + if (params_to_keep.size() > 0) { for (q = 0; (q < params_to_keep.size()) && (q < 64); q++) { @@ -1321,12 +1321,12 @@ class TreeSocket : public InspSocket if (smode) { Instance->Log(DEBUG,"Send mode"); - this->Instance->SendMode(modelist, n+2, who); + this->Instance->SendMode(modelist, n, who); } else { Instance->Log(DEBUG,"Send mode client"); - this->Instance->CallCommandHandler("MODE", modelist, n+2, who); + this->Instance->CallCommandHandler("MODE", modelist, n, who); } /* HOT POTATO! PASS IT ON! */ -- cgit v1.2.3