diff options
-rw-r--r-- | src/emap/init.c | 1 | ||||
-rw-r--r-- | src/emap/script_buildins.c | 15 | ||||
-rw-r--r-- | src/emap/script_buildins.h | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/src/emap/init.c b/src/emap/init.c index 834f3ae..c8d0ac8 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -246,6 +246,7 @@ HPExport void plugin_init (void) addScriptCommand("bgnew", "siiss", bgnew); addScriptCommand("bgjoin", "isii?", bgjoin); addScriptCommand("apicall", "is", apicall); + addScriptCommand("apiasync", "s", apiasync); // Overrides addScriptCommand("debugmes","v*",debugmes); diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 5c91301..1a34958 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -3616,6 +3616,21 @@ BUILDIN(apicall) #endif return true; } + + +/*========================================== + * Sends something over PyLog + *------------------------------------------*/ +BUILDIN(apiasync) +{ +#ifdef PYTHON_LOGS + logs->pylog(script_getstr(st, 2)); + script_pushint(st, 1); +#else + script_pushint(st, 0); +#endif + return true; +} ////////////////////////////////////////////////////////// /* switch (bl->type) { diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h index 957bd2b..756ee0b 100644 --- a/src/emap/script_buildins.h +++ b/src/emap/script_buildins.h @@ -130,6 +130,7 @@ BUILDIN(getskillname); BUILDIN(bgnew); BUILDIN(bgjoin); BUILDIN(apicall); +BUILDIN(apiasync); // Overrides BUILDIN(countitem); |