1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

Allow ERROR command on server and service links only

Ignore it and add a penalty time on all other link types.
This commit is contained in:
Alexander Barton 2012-12-31 21:46:41 +01:00
parent 5d92198487
commit 3e47bc9af5

View File

@ -81,6 +81,17 @@ IRC_ERROR( CLIENT *Client, REQUEST *Req )
assert( Client != NULL );
assert( Req != NULL );
if (Client_Type(Client) != CLIENT_GOTPASS
&& Client_Type(Client) != CLIENT_GOTPASS_2813
&& Client_Type(Client) != CLIENT_UNKNOWNSERVER
&& Client_Type(Client) != CLIENT_SERVER
&& Client_Type(Client) != CLIENT_SERVICE) {
LogDebug("Ignored ERROR command from \"%s\" ...",
Client_Mask(Client));
IRC_SetPenalty(Client, 2);
return CONNECTED;
}
if (Req->argc < 1)
Log(LOG_NOTICE, "Got ERROR from \"%s\"!",
Client_Mask(Client));