aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-13 17:41:18 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-22 13:02:08 +0200
commit0488bf54d3f0b767eb53a026b4b52de86cfbd4ab (patch)
treeb19169b991a8a97bd80572827205976cfe4de1db /src
parentda19aee307221dd2e6bdd00393124587654d0206 (diff)
downloadminetest-0488bf54d3f0b767eb53a026b4b52de86cfbd4ab.tar.gz
minetest-0488bf54d3f0b767eb53a026b4b52de86cfbd4ab.tar.bz2
minetest-0488bf54d3f0b767eb53a026b4b52de86cfbd4ab.zip
/me command
Diffstat (limited to 'src')
-rw-r--r--src/servercommand.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/servercommand.cpp b/src/servercommand.cpp
index 31f18c53c..89ba0771f 100644
--- a/src/servercommand.cpp
+++ b/src/servercommand.cpp
@@ -25,6 +25,14 @@ void cmd_status(std::wostringstream &os,
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,
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<<L"-!- Invalid command: " + ctx->parms[0];