Skip to content

Commit

Permalink
fix against command flooding
Browse files Browse the repository at this point in the history
  • Loading branch information
Shakar authored and HarpyWar committed Apr 29, 2012
1 parent 7dfb42a commit 74f9e4f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pvpgn/src/bnetd/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ extern int handle_command(t_connection * c, char const * text)
{
t_command_table_row const *p;

if ((text[0]!='\0') && (conn_quota_exceeded(c,text)))
{
message_send_text(c,message_type_error,c,"You are sending commands to Battle.net too quickly and risk being disconnected for flooding. Please slow down.");
return 0;
}

for (p = standard_command_table; p->command_string != NULL; p++)
{
if (strstart(text, p->command_string)==0)
Expand Down

0 comments on commit 74f9e4f

Please sign in to comment.