summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-25 18:11:41 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-25 18:11:41 -0300
commitd9bddb94ac69ca93ee2e92e0f814f41158d4724c (patch)
treee4ca5879f6e82f76630e5d57d1183b3346c4875a
parent56f7332c3118ec7b421c679bf691fe8b935de65d (diff)
downloadserverdata-d9bddb94ac69ca93ee2e92e0f814f41158d4724c.tar.gz
serverdata-d9bddb94ac69ca93ee2e92e0f814f41158d4724c.tar.bz2
serverdata-d9bddb94ac69ca93ee2e92e0f814f41158d4724c.tar.xz
serverdata-d9bddb94ac69ca93ee2e92e0f814f41158d4724c.zip
Enforce validatepin() to take a while to respond to avoid its abuse.
-rw-r--r--npc/functions/main.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index e0b1c2ac7..6bcc6d515 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -412,6 +412,8 @@ function script validatepin {
atcommand "@kick "+strcharinfo(0);
return 0;
}
+ // Enforce some cooldown to prevent an eventual exploit/abuse
+ sleep2(rand2(150, 400));
mesc l("Thanks, @@. We just wanted to be sure it was you.", .@value$[0]);
mes "";
return true;