- Log(LOG_ERR,
- "Invalid prefix \"%s\", client not known (connection %d, command \"%s\")!?",
- Req->prefix, Idx, Req->command);
- if (!Conn_WriteStr(Idx,
- "ERROR :Invalid prefix \"%s\", client not known",
- Req->prefix))
- *Closed = true;
+ if (Client_Type(client) != CLIENT_SERVER) {
+ Log(LOG_ERR,
+ "Ignoring command with invalid prefix \"%s\" from \"%s\" (connection %d, command \"%s\")!",
+ Req->prefix, Client_ID(client), Idx, Req->command);
+ if (!Conn_WriteStr(Idx,
+ "ERROR :Invalid prefix \"%s\"",
+ Req->prefix))
+ *Closed = true;
+ IRC_SetPenalty(client, 2);
+ } else
+ LogDebug("Ignoring command with invalid prefix \"%s\" from \"%s\" (connection %d, command \"%s\")!",
+ Req->prefix, Client_ID(client), Idx, Req->command);