diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 5ff9fcc2..46164ce1 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -514,10 +514,20 @@ Handle_Request( CONN_ID Idx, REQUEST *Req ) continue; } - if (!(client_type & cmd->type)) - return IRC_WriteStrClient(client, ERR_NOTREGISTERED_MSG, Client_ID(client)); + if (!(client_type & cmd->type)) { + if (client_type == CLIENT_USER + && cmd->type & CLIENT_SERVER) + return IRC_WriteStrClient(client, + ERR_NOTREGISTEREDSERVER_MSG, + Client_ID(client)); + else + return IRC_WriteStrClient(client, + ERR_NOTREGISTERED_MSG, + Client_ID(client)); + } - /* Command is allowed for this client: call it and count produced bytes */ + /* Command is allowed for this client: call it and count + * generated bytes in output */ Conn_ResetWCounter(); result = (cmd->function)(client, Req); cmd->bytes += Conn_WCounter();