From 50842b7eecde5d0f0152256f07d6504d557a699b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 20 Sep 2021 20:15:51 -0300 Subject: I'll need notice capability too --- src/emap/script_buildins.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/emap/script_buildins.c') diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 7fe408a..0163a6a 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -3106,6 +3106,26 @@ BUILDIN(consolebug) return true; } +/*========================================== + * + *------------------------------------------*/ +BUILDIN(consoleinfo) +{ + struct StringBuf buf; + StrBuf->Init(&buf); + + if (!script->sprintf_helper(st, 2, &buf)) { + StrBuf->Destroy(&buf); + script_pushint(st, 0); + return false; + } + + ShowNotice("script notice : %d %d : %s\n", st->rid, st->oid, StrBuf->Value(&buf)); + StrBuf->Destroy(&buf); + script_pushint(st, 1); + return true; +} + /*========================================== * gmcommand [MouseJstr] *------------------------------------------*/ -- cgit v1.2.3-70-g09d2