Notify player whose password is being changed
authorKahrl <kahrl@gmx.net>
Mon, 21 Nov 2011 00:35:44 +0000 (01:35 +0100)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 3 Dec 2011 09:47:19 +0000 (11:47 +0200)
src/servercommand.cpp

index d971b18a04c34d103a1a26d104b4e8bceecfea28..e2e84bacb000945e4bf2ac08a392217cc8045fea 100644 (file)
@@ -326,6 +326,10 @@ void cmd_setclearpassword(std::wostringstream &os,
 
        ctx->server->setPlayerPassword(playername, password);
 
+       std::wostringstream msg;
+       msg<<ctx->player->getName()<<L" changed your password";
+       ctx->server->notifyPlayer(playername.c_str(), msg.str());
+
        os<<L"-!- Password change for "<<narrow_to_wide(playername)<<" successful";
 }