diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-17 01:38:08 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-17 01:38:08 -0300 |
commit | 36c4f507a71396d290db960092fdeb2d3b31b34a (patch) | |
tree | 15eb259feade9f7169e2046e8c2a4625dfb9f8b6 /npc/commands/ucp.txt | |
parent | 3a512bb30e8e8721c0e191a93d5b49ef27b5719e (diff) | |
download | serverdata-36c4f507a71396d290db960092fdeb2d3b31b34a.tar.gz serverdata-36c4f507a71396d290db960092fdeb2d3b31b34a.tar.bz2 serverdata-36c4f507a71396d290db960092fdeb2d3b31b34a.tar.xz serverdata-36c4f507a71396d290db960092fdeb2d3b31b34a.zip |
Some minimal protection against query flood on ucp. As I said, minimal
Diffstat (limited to 'npc/commands/ucp.txt')
-rw-r--r-- | npc/commands/ucp.txt | 7 |
1 files changed, 7 insertions, 0 deletions
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)); |