diff options
| author | Alexander Barton <alex@barton.de> | 2005-09-04 23:42:24 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2005-09-04 23:42:24 +0000 |
| commit | 4d18ac83a271b014be289e3856988d2c653384e1 (patch) | |
| tree | 7c833087e566238a4e5d8b98d6ede11fd25c6a7c /src | |
| parent | 660b529c104dd85f01bd6b5fe2e30c9a9904b058 (diff) | |
| download | ngircd-4d18ac83a271b014be289e3856988d2c653384e1.tar.gz ngircd-4d18ac83a271b014be289e3856988d2c653384e1.zip | |
Set one second penalty on unknown commands.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/parse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 582e4893..5896a027 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -12,7 +12,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: parse.c,v 1.65 2005/07/31 20:13:08 alex Exp $"; +static char UNUSED id[] = "$Id: parse.c,v 1.66 2005/09/04 23:42:24 alex Exp $"; /** * @file @@ -445,9 +445,12 @@ Handle_Request( CONN_ID Idx, REQUEST *Req ) Req->argc == 1 ? "parameter" : "parameters", Req->prefix ? "" : " no" ); - if( Client_Type( client ) != CLIENT_SERVER ) - return IRC_WriteStrClient( client, ERR_UNKNOWNCOMMAND_MSG, - Client_ID( client ), Req->command ); + if (Client_Type(client) != CLIENT_SERVER) { + result = IRC_WriteStrClient(client, ERR_UNKNOWNCOMMAND_MSG, + Client_ID(client), Req->command); + Conn_SetPenalty(Idx, 1); + return result; + } return true; } /* Handle_Request */ |