commit - d8f2964710985597281de73aecd0a1ece30ecb03
commit + 508ca3044dd6d1a88686efceda92a7f2a9b4a926
blob - 5ff9fcc2ce84136bb3fec671f2c822293da0cda7
blob + 46164ce1515cb073ada9ffe92e75ade8d5cf207c
--- src/ngircd/parse.c
+++ src/ngircd/parse.c
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();