From 75b712abea826110958eb34f30372d0abc4b8e2a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 21 Jun 2020 03:03:29 -0300 Subject: New function: api_send() --- npc/functions/util.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/npc/functions/util.txt b/npc/functions/util.txt index c23352147..75f1faf64 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -1061,3 +1061,12 @@ function script json_encode { } +// api_send( code, data ) +// sends to API +function script api_send { + .@cde=getarg(0); + .@fm$=getarg(1); + query_sql("INSERT INTO `api_export` (`type`, `data`) VALUES ('"+.@cde+"', \""+.@fm$+"\")"); + return; +} + -- cgit v1.2.3-70-g09d2