#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.67 2006/04/23 10:37:27 fw Exp $";
/**
* @file
if( ! Req->prefix ) return true;
/* Client-Struktur der Connection ermitteln */
- client = Client_GetFromConn( Idx );
+ client = Conn_GetClient( Idx );
assert( client != NULL );
/* nur validieren, wenn bereits registrierte Verbindung */
{
/* das angegebene Prefix ist aus dieser Richtung, also
* aus der gegebenen Connection, ungueltig! */
- Log( LOG_ERR, "Spoofed prefix \"%s\" from \"%s\" (connection %d, command %s)!", Req->prefix, Client_Mask( Client_GetFromConn( Idx )), Idx, Req->command );
+ Log( LOG_ERR, "Spoofed prefix \"%s\" from \"%s\" (connection %d, command %s)!", Req->prefix, Client_Mask( Conn_GetClient( Idx )), Idx, Req->command );
Conn_Close( Idx, NULL, "Spoofed prefix", true);
*Closed = true;
return false;
assert( Req != NULL );
assert( Req->command != NULL );
- client = Client_GetFromConn( Idx );
+ client = Conn_GetClient( Idx );
assert( client != NULL );
/* Statuscode? */
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 */