From: Giuseppe Bilotta Date: Sat, 13 Aug 2011 15:41:18 +0000 (+0200) Subject: /me command X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=0488bf54d3f0b767eb53a026b4b52de86cfbd4ab;p=zefram%2Fminetest%2Fminetest_engine.git /me command --- diff --git a/src/servercommand.cpp b/src/servercommand.cpp index 31f18c53..89ba0771 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -25,6 +25,14 @@ void cmd_status(std::wostringstream &os, os<server->getStatusString(); } +void cmd_me(std::wostringstream &os, + ServerCommandContext *ctx) +{ + std::wstring name = narrow_to_wide(ctx->player->getName()); + os << L"* " << name << L" " << ctx->paramstring; + ctx->flags |= SEND_TO_OTHERS | SEND_NO_PREFIX; +} + void cmd_privs(std::wostringstream &os, ServerCommandContext *ctx) { @@ -283,6 +291,10 @@ std::wstring processServerCommand(ServerCommandContext *ctx) { cmd_banunban(os, ctx); } + else if(ctx->parms[0] == L"me") + { + cmd_me(os, ctx); + } else { os<parms[0];