From 36c4f507a71396d290db960092fdeb2d3b31b34a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 17 Jul 2018 01:38:08 -0300 Subject: Some minimal protection against query flood on ucp. As I said, minimal --- npc/commands/ucp.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'npc/commands') diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt index 8372502cf..a11d2e0c5 100644 --- a/npc/commands/ucp.txt +++ b/npc/commands/ucp.txt @@ -20,8 +20,15 @@ function script UserCtrlPanel { case 1: GameRules; break; case 2: GameNews; break; case 3: + if (@query) { + mesn; + mesc l("Anti flood protection is enabled. Request rejected."), 1; + next; + break; + } if (!validatepin()) break; + @query=1; query_sql("SELECT email,logincount,last_ip FROM `login` WHERE account_id="+getcharid(3)+"' LIMIT 2", .@email$, .@lgc, .@ip$); mes l("Char Name: @@", strcharinfo(0)); mes l("Party Name: @@", strcharinfo(1)); -- cgit v1.2.3-60-g2f50