From 5d2b8234597e9560d2c664a04ba16c61011096a2 Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 15 Apr 2015 10:43:49 -0400 Subject: add gmlog builtin --- src/map/script-fun.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/map/script-fun.cpp') 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 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'), -- cgit v1.2.3-60-g2f50