1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-24 08:28:49 -05:00

/me command

This commit is contained in:
Giuseppe Bilotta 2011-08-13 17:41:18 +02:00
parent da19aee307
commit 0488bf54d3

View File

@ -25,6 +25,14 @@ void cmd_status(std::wostringstream &os,
os<<ctx->server->getStatusString(); os<<ctx->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, void cmd_privs(std::wostringstream &os,
ServerCommandContext *ctx) ServerCommandContext *ctx)
{ {
@ -283,6 +291,10 @@ std::wstring processServerCommand(ServerCommandContext *ctx)
{ {
cmd_banunban(os, ctx); cmd_banunban(os, ctx);
} }
else if(ctx->parms[0] == L"me")
{
cmd_me(os, ctx);
}
else else
{ {
os<<L"-!- Invalid command: " + ctx->parms[0]; os<<L"-!- Invalid command: " + ctx->parms[0];