diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-03 12:36:14 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-03 12:36:14 +0200 |
commit | 2eb0505a16cf5b70076bab2de494ef92b7e991d9 (patch) | |
tree | 89c10af83c07457640aecbfe42e56f7fde7ccb42 /src/modules | |
parent | e827ec50d89e296ea6b19807631b56ed80e869a7 (diff) |
User::ChangeNick() cannot fail if the new nick is the uuid, document this and rely on it
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/save.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_spanningtree/svsnick.cpp | 5 |
2 files changed, 2 insertions, 10 deletions
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); } } |