summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 18:15:26 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 18:15:26 +0000
commitae30e67a0543a8f09202e03b7a07912f88c8edcb (patch)
tree113679a7e68b0d82294e5a861b62868bd6e7f377 /src/modules
parentdd7cc526c8ae2d5ccfc895f7b9dd7c1075964605 (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp12
1 files changed, 10 insertions, 2 deletions
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<std::string> &p
if (u)
{
Utils->DoOneToAllButSender(prefix,"SVSNICK",params,prefix);
+
if (IS_LOCAL(u))
{
std::deque<std::string> 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;
}