From 7e5439b27f0f64d876034de22c18fe306d9e742d Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 31 Aug 2008 14:06:04 +0000 Subject: More debugging mesages for troubleshooting invalid mode sequences in UID git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10367 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/uid.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index de3b669c4..b0f5df21d 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -119,13 +119,20 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa if (mh) { - if (mh->GetNumParams(true) && (paramptr < params.size() - 1)) - mh->OnModeChange(_new, _new, NULL, params[paramptr++], true); + if (mh->GetNumParams(true)) + { + if (paramptr < params.size() - 1) + mh->OnModeChange(_new, _new, NULL, params[paramptr++], true); + else + Instance->Logs->Log("m_spanningtree", DEBUG, "Warning: Broken UID command, expected a parameter for user mode '%c' but there aren't enough parameters in the command!", *v); + } else mh->OnModeChange(_new, _new, NULL, empty, true); _new->SetMode(*v, true); mh->ChangeCount(1); } + else + Instance->Logs->Log("m_spanningtree", DEBUG, "Warning: Broken UID command, unknown user mode '%c' in the mode string!", *v); } //_new->ProcessNoticeMasks(params[7].c_str()); -- cgit v1.2.3