summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf1
-rw-r--r--npc/functions/hub.txt13
2 files changed, 13 insertions, 1 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 022026b64..c5b6f099a 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -1521,6 +1521,7 @@ constants_db: {
comment__: "API codes"
API_PINCODE: 302
API_SENDMAIL: 501
+ API_FLUSHVAULT: 607
comment__: "outdated constants. must be removed"
// >>>
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 3c639e31d..229005953 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -225,8 +225,19 @@ function script HUB_Logout {
}
// Register logout time
- if (!.@dead)
+ if (!.@dead) {
CHAREG_CLEANUP=gettimetick(2);
+ // Send updates to Vault API
+ if (##VAULT) {
+ .@api$=json_encode("UID", ##VAULT,
+ "GID", getcharid(3),
+ "VAR1N", "HELLO",
+ "VAR1V", ##01_HELLO,
+ "VAR2N", "WORLD",
+ "VAR2V", ##01_WORLD);
+ api_send(API_FLUSHVAULT, .@api$);
+ }
+ }
callfunc "02524_Avenge_BlackBox", .@dead;
return;