diff options
-rw-r--r-- | src/mode.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 6 |
2 files changed, 7 insertions, 4 deletions
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! */ |