summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index dd8666b..5c91301 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -23,6 +23,9 @@
#include "map/guild.h"
#include "map/homunculus.h"
#include "map/instance.h"
+#ifdef PYTHON_LOGS
+#include "map/log.h"
+#endif
#include "map/mapreg.h"
#include "map/mob.h"
#include "map/npc.h"
@@ -3593,6 +3596,26 @@ BUILDIN(bgjoin)
return true;
}
+
+/*==========================================
+ * Sends something over PyLog
+ *------------------------------------------*/
+BUILDIN(apicall)
+{
+#ifdef PYTHON_LOGS
+ char bf1[1024], bf3[2048], bf4[16];
+ sprintf(bf1,"SQL→INSERT INTO `api_export` (`type`, `data`) VALUES ('%d', '?1')", script_getnum(st, 2));
+ logs->pylog(bf1);
+ sprintf(bf3, "SAD1→%s", script_getstr(st, 3));
+ logs->pylog(bf3);
+ sprintf(bf4, "SQLRUN→");
+ logs->pylog(bf4);
+ script_pushint(st, 1);
+#else
+ script_pushint(st, 0);
+#endif
+ return true;
+}
//////////////////////////////////////////////////////////
/*
switch (bl->type) {