From fbb5d1197ceb21540d56d53976a308449053779e Mon Sep 17 00:00:00 2001
From: mekolat <mekolat@gmail.com>
Date: Mon, 6 Apr 2015 21:24:42 -0400
Subject: add wgm builtin

---
 src/map/script-fun.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'src')

diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 3b814aa..d7b810e 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -677,6 +677,16 @@ void builtin_getelementofarray(ScriptState *st)
     }
 }
 
+static
+void builtin_wgm(ScriptState *st)
+{
+    ZString message = ZString(conv_str(st, &AARG(0)));
+
+    intif_wis_message_to_gm(WISP_SERVER_NAME,
+            battle_config.hack_info_GM_level,
+            STRPRINTF("[GM] %s"_fmt, message));
+}
+
 /*==========================================
  *
  *------------------------------------------
@@ -3166,6 +3176,7 @@ BuiltinFunction builtin_functions[] =
     BUILTIN(sc_end, "i"_s, '\0'),
     BUILTIN(sc_check, "i"_s, 'i'),
     BUILTIN(debugmes, "s"_s, '\0'),
+    BUILTIN(wgm, "s"_s, '\0'),
     BUILTIN(resetstatus, ""_s, '\0'),
     BUILTIN(changesex, ""_s, '\0'),
     BUILTIN(attachrid, "i"_s, 'i'),
-- 
cgit v1.2.3-70-g09d2