X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fsave.cpp;h=be3a0a687cf23c091b58c78aecc55d8ab57d306f;hb=ee7db9bbfbb5f3bc7359d22e7021415aebddb9d2;hp=8f0eced7333af7fb2495c4a4f670bf913354ebf6;hpb=1031f333332cf1b09db4fd632f141143ee637c34;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/save.cpp b/src/modules/m_spanningtree/save.cpp index 8f0eced73..be3a0a687 100644 --- a/src/modules/m_spanningtree/save.cpp +++ b/src/modules/m_spanningtree/save.cpp @@ -26,22 +26,16 @@ /** * SAVE command - force nick change to UID on timestamp match */ -CmdResult CommandSave::Handle(User* user, std::vector& params) +CmdResult CommandSave::Handle(User* user, Params& params) { - User* u = ServerInstance->FindNick(params[0]); - if ((!u) || (IS_SERVER(u))) + User* u = ServerInstance->FindUUID(params[0]); + if (!u) return CMD_FAILURE; - time_t ts = atol(params[1].c_str()); + time_t ts = ConvToNum(params[1]); if (u->age == ts) - { - if (!u->ForceNickChange(u->uuid)) - { - ServerInstance->Users->QuitUser(u, "Nickname collision"); - } - } + u->ChangeNick(u->uuid, SavedTimestamp); return CMD_SUCCESS; } -