Configuration Macros
CHECK_ARGS(cmd_rec *cmd, int argc)
cmd_rec->argc
, because cmd_rec->argc
includes
cmd_rec->argv[0]
(the directive itself). This check
also ensures only that there is an equal or greater number of
arguments than the number requested. If this check fails, a generic
error is sent to the user.CHECK_ARGS(cmd, 1);
CHECK_HASARGS(cmd_rec *cmd, int argc)
if (!CHECK_HASARGS(cmd, 3)) {
CHECK_VARARGS(cmd_rec *cmd, int argc_min, int argc_max)
CHECK_VARARGS(cmd, 1, 5);
CHECK_CONF(cmd_rec *cmd, int flags)
<Anonymous>
and <Limit>
,
but nowhere else. If this macro fails a generic error is
logged and the handler aborts.CHECK_CONF(cmd, CONF_ANON|CONF_LIMIT);
CONF_ERROR(cmd_rec *cmd, char *message)
CONF_ERROR(cmd, "syntax: expected numbers, not letters");
Command Macros
CHECK_CMD_ARGS(cmd_rec *cmd, int argc)
R_501
error code, with a message stating the problem, is
issued to the client.CHECK_CMD_ARGS(cmd, 2);
CHECK_CMD_MIN_ARGS(cmd_rec *cmd, int argc)
R_501
error code is issued to the client.CHECK_CMD_MIN_ARGS(cmd, 2);
Authentication Macros