summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2015-04-15 10:43:49 -0400
committermekolat <mekolat@users.noreply.github.com>2015-04-23 13:03:11 -0400
commit5d2b8234597e9560d2c664a04ba16c61011096a2 (patch)
treebee2dda473d67e869e4206c2fc9a345dfb28c602
parentfbb5d1197ceb21540d56d53976a308449053779e (diff)
downloadtmwa-5d2b8234597e9560d2c664a04ba16c61011096a2.tar.gz
tmwa-5d2b8234597e9560d2c664a04ba16c61011096a2.tar.bz2
tmwa-5d2b8234597e9560d2c664a04ba16c61011096a2.tar.xz
tmwa-5d2b8234597e9560d2c664a04ba16c61011096a2.zip
add gmlog builtin
-rw-r--r--src/map/script-fun.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index d7b810e..bfad390 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -687,6 +687,14 @@ void builtin_wgm(ScriptState *st)
STRPRINTF("[GM] %s"_fmt, message));
}
+static
+void builtin_gmlog(ScriptState *st)
+{
+ dumb_ptr<map_session_data> sd = script_rid2sd(st);
+ ZString message = ZString(conv_str(st, &AARG(0)));
+ log_atcommand(sd, STRPRINTF("{SCRIPT} %s"_fmt, message));
+}
+
/*==========================================
*
*------------------------------------------
@@ -3177,6 +3185,7 @@ BuiltinFunction builtin_functions[] =
BUILTIN(sc_check, "i"_s, 'i'),
BUILTIN(debugmes, "s"_s, '\0'),
BUILTIN(wgm, "s"_s, '\0'),
+ BUILTIN(gmlog, "s"_s, '\0'),
BUILTIN(resetstatus, ""_s, '\0'),
BUILTIN(changesex, ""_s, '\0'),
BUILTIN(attachrid, "i"_s, 'i'),