diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-05-08 23:08:08 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-05-08 23:08:08 -0300 |
commit | 1b3d2f507ff6660ad9ecc4a0864d517ca7a1af67 (patch) | |
tree | e91bc2f72282df09aaa61485bb8961bf1eafbba1 /src | |
parent | dd18ef8db4336b323ed8d77c315a76829c2e7ce9 (diff) | |
download | evol-hercules-1b3d2f507ff6660ad9ecc4a0864d517ca7a1af67.tar.gz evol-hercules-1b3d2f507ff6660ad9ecc4a0864d517ca7a1af67.tar.bz2 evol-hercules-1b3d2f507ff6660ad9ecc4a0864d517ca7a1af67.tar.xz evol-hercules-1b3d2f507ff6660ad9ecc4a0864d517ca7a1af67.zip |
Add apiasync, for raw packets
Diffstat (limited to 'src')
-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); |