1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
17 #include "socketengine.h"
21 #include "treeserver.h"
22 #include "treesocket.h"
24 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
27 * SAVE command - force nick change to UID on timestamp match
29 bool TreeSocket::ForceNick(const std::string &prefix, parameterlist ¶ms)
31 if (params.size() < 2)
34 User* u = ServerInstance->FindNick(params[0]);
35 time_t ts = atol(params[1].c_str());
37 if (u && u->age == ts)
39 Utils->DoOneToAllButSender(prefix,"SAVE",params,prefix);
41 if (!u->ForceNickChange(u->uuid.c_str()))
43 ServerInstance->Users->QuitUser(u, "Nickname collision");