From 645d9e7838a33e01c58d8a846f6b2687a8e8757d Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 29 Aug 2007 19:45:03 +0000 Subject: IMPORTANT: UID command now takes TEN parameters in 1.2. We never had a signon time seperate from the TS in the UID command (or 1.1's NICK command) because in 1.1 this timestamp never updated and was therefore useful for both values. This is no longer the case and we must pass both seperately git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7988 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index d89d454e2..d8576c2e4 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -1005,18 +1005,20 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa /** Do we have enough parameters: * UID uuid age nick host dhost ident +modestr ip.string :gecos */ - if (params.size() != 9) + if (params.size() != 10) { - this->WriteLine(std::string(":")+this->Instance->Config->GetSID()+" KILL "+params[0]+" :Invalid client introduction ("+params[0]+"?)"); + this->WriteLine(std::string(":")+this->Instance->Config->GetSID()+" KILL "+params[0]+" :Invalid client introduction ("+params[0]+" with only "+ + ConvToStr(params.size())+" of 10 parameters?)"); return true; } time_t age = ConvToInt(params[1]); + time_t signon = ConvToInt(params[8]); const char* tempnick = params[2].c_str(); std::string empty; /* XXX probably validate UID length too -- w00t */ - cmd_validation valid[] = { {"Nickname", 2, NICKMAX}, {"Hostname", 3, 64}, {"Displayed hostname", 4, 64}, {"Ident", 5, IDENTMAX}, {"GECOS", 7, MAXGECOS}, {"", 0, 0} }; + cmd_validation valid[] = { {"Nickname", 2, NICKMAX}, {"Hostname", 3, 64}, {"Displayed hostname", 4, 64}, {"Ident", 5, IDENTMAX}, {"GECOS", 9, MAXGECOS}, {"", 0, 0} }; TreeServer* remoteserver = Utils->FindServer(source); @@ -1084,7 +1086,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa strlcpy(_new->ident, params[5].c_str(),IDENTMAX); strlcpy(_new->fullname, params[8].c_str(),MAXGECOS); _new->registered = REG_ALL; - _new->signon = age; + _new->signon = signon; _new->age = age; /* we need to remove the + from the modestring, so we can do our stuff */ -- cgit v1.2.3