From ae30e67a0543a8f09202e03b7a07912f88c8edcb Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 27 Aug 2007 18:15:26 +0000 Subject: If SVSNICK fails, attempt to change to UID, before quitting as a last resort (if a module disallows change to a UID, they need shooting) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7901 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 4736976b3..f8ba67cc5 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -284,18 +284,26 @@ bool TreeSocket::ForceNick(const std::string &prefix, std::deque &p if (u) { Utils->DoOneToAllButSender(prefix,"SVSNICK",params,prefix); + if (IS_LOCAL(u)) { std::deque par; par.push_back(params[1]); + if (!u->ForceNickChange(params[1].c_str())) { - userrec::QuitUser(this->Instance, u, "Nickname collision"); - return true; + /* buh. UID them */ + if (!u->ForceNickChange(u->uuid)) + { + userrec::QuitUser(this->Instance, u, "Nickname collision"); + return true; + } } + u->age = atoi(params[2].c_str()); } } + return true; } -- cgit v1.2.3