From 2a88309abe3f5757b7638e32d44bc89b7d4f5b0e Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 30 Sep 2008 22:21:34 +0000 Subject: Some suggestions from jilles about handling unknown prefix errors, and some ideas of my own about handling unknown modes in client introduction to prevent leaving a desynched user on the source server git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10613 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/uid.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree/uid.cpp') diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 3cc4c9618..682b4d29a 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -120,7 +120,12 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa if (paramptr < params.size() - 1) mh->OnModeChange(_new, _new, NULL, params[paramptr++], true); else - ServerInstance->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); + { + this->WriteLine(std::string(":")+this->ServerInstance->Config->GetSID()+" KILL "+params[0]+" :Broken UID command, expected a parameter for user mode '"+(*v)+"' but there aren't enough parameters in the command!"); + this->ServerInstance->Users->clientlist->erase(params[0]); + delete _new; + return true; + } } else mh->OnModeChange(_new, _new, NULL, empty, true); @@ -128,7 +133,12 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa mh->ChangeCount(1); } else - ServerInstance->Logs->Log("m_spanningtree", DEBUG, "Warning: Broken UID command, unknown user mode '%c' in the mode string!", *v); + { + this->WriteLine(std::string(":")+this->ServerInstance->Config->GetSID()+" KILL "+params[0]+" :Warning: Broken UID command, unknown user mode '"+(*v)+"' in the mode string!"); + this->ServerInstance->Users->clientlist->erase(params[0]); + delete _new; + return true; + } } //_new->ProcessNoticeMasks(params[7].c_str()); -- cgit v1.3.1-10-gc9f91