diff options
-rw-r--r-- | include/users.h | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/save.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_spanningtree/svsnick.cpp | 5 |
3 files changed, 3 insertions, 11 deletions
diff --git a/include/users.h b/include/users.h index 4029daa53..6408bc45f 100644 --- a/include/users.h +++ b/include/users.h @@ -588,7 +588,7 @@ class CoreExport User : public Extensible bool ChangeName(const std::string& gecos); /** Change a user's nick - * @param newnick The new nick + * @param newnick The new nick. If equal to the users uuid, the nick change always succeeds. * @return True if the change succeeded */ bool ChangeNick(const std::string& newnick, time_t newts = 0); diff --git a/src/modules/m_spanningtree/save.cpp b/src/modules/m_spanningtree/save.cpp index dd9e866a9..75fdd478c 100644 --- a/src/modules/m_spanningtree/save.cpp +++ b/src/modules/m_spanningtree/save.cpp @@ -35,12 +35,7 @@ CmdResult CommandSave::Handle(User* user, std::vector<std::string>& params) time_t ts = atol(params[1].c_str()); if (u->age == ts) - { - if (!u->ChangeNick(u->uuid)) - { - ServerInstance->Users->QuitUser(u, "Nickname collision"); - } - } + u->ChangeNick(u->uuid); return CMD_SUCCESS; } diff --git a/src/modules/m_spanningtree/svsnick.cpp b/src/modules/m_spanningtree/svsnick.cpp index de1331640..8689f71ac 100644 --- a/src/modules/m_spanningtree/svsnick.cpp +++ b/src/modules/m_spanningtree/svsnick.cpp @@ -40,10 +40,7 @@ CmdResult CommandSVSNick::Handle(User* user, std::vector<std::string>& parameter if (!u->ChangeNick(nick, NickTS)) { /* buh. UID them */ - if (!u->ChangeNick(u->uuid)) - { - ServerInstance->Users->QuitUser(u, "Nickname collision"); - } + u->ChangeNick(u->uuid); } } |