commit - fcf61e9e0264d081e72eedddbd4a45b619e82b01
commit + 344185b1bd6254ac4a198b3caeaf08db285016c8
blob - 202f427f967d8cfa3d8606a61765f80c8274b197
blob + f1d02711b35cfba3de103bfa836c366a40ad21c8
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
assert( Client != NULL );
assert( Chan != NULL );
- IRC_SetPenalty(Client, 1);
-
is_member = Channel_IsMemberOf(Chan, Client);
/* Secret channel? */
}
/* No channel or (valid) mask given */
- IRC_SetPenalty(Client, 2);
return IRC_WHO_Mask(Client, NULL, only_ops);
} /* IRC_WHO */
assert( Client != NULL );
assert( Req != NULL );
- IRC_SetPenalty(Client, 1);
-
/* Wrong number of parameters? */
if (Req->argc < 1)
return IRC_WriteErrClient(Client, ERR_NONICKNAMEGIVEN_MSG,
blob - 8e76db17084461f8c6c971bbd79b9858cd0c8c3e
blob + a29ed2387fe64b1274c9636ebee70724e9e10fb7
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
Client_Modes(Target));
}
- IRC_SetPenalty(Client, 1);
return ok;
} /* Client_Mode */
}
}
- IRC_SetPenalty(Client, 1);
return connected;
} /* Channel_Mode */
blob - 4235497b35e43d34aedc8f04a93c8df8237c2af4
blob + fdb957c3efe0c52d881ff3cdffd6bf345e98de02
--- src/ngircd/parse.c
+++ src/ngircd/parse.c
_CMD("LIST", IRC_LIST, CLIENT_USER|CLIENT_SERVER, 0, 2, 2),
_CMD("LUSERS", IRC_LUSERS, CLIENT_USER|CLIENT_SERVER, 0, 2, 1),
_CMD("METADATA", IRC_METADATA, CLIENT_SERVER, 3, 3, 0),
- _CMD("MODE", IRC_MODE, CLIENT_USER|CLIENT_SERVER, 1, -1, 0),
+ _CMD("MODE", IRC_MODE, CLIENT_USER|CLIENT_SERVER, 1, -1, 1),
_CMD("MOTD", IRC_MOTD, CLIENT_USER|CLIENT_SERVER, 0, 1, 3),
_CMD("NAMES", IRC_NAMES, CLIENT_USER|CLIENT_SERVER, 0, 2, 1),
_CMD("NICK", IRC_NICK, CLIENT_ANY, 0, -1, 0),
_CMD("WALLOPS", IRC_WALLOPS, CLIENT_USER|CLIENT_SERVER, 1, 1, 0),
_CMD("WEBIRC", IRC_WEBIRC, CLIENT_UNKNOWN, 4, 4, 0),
_CMD("WHO", IRC_WHO, CLIENT_USER, 0, 2, 1),
- _CMD("WHOIS", IRC_WHOIS, CLIENT_USER|CLIENT_SERVER, 0, -1, 0),
+ _CMD("WHOIS", IRC_WHOIS, CLIENT_USER|CLIENT_SERVER, 0, -1, 1),
_CMD("WHOWAS", IRC_WHOWAS, CLIENT_USER|CLIENT_SERVER, 0, -1, 0),
#ifdef IRCPLUS
ERR_NOTREGISTERED_MSG,
Client_ID(client));
}
+
+ if (cmd->penalty)
+ IRC_SetPenalty(client, cmd->penalty);
if (Req->argc < cmd->min_argc ||
(cmd->max_argc != -1 && Req->argc > cmd->max_argc))
return IRC_WriteErrClient(client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(client), Req->command);
- if (cmd->penalty)
- IRC_SetPenalty(client, cmd->penalty);
-
/* Command is allowed for this client: call it and count
* generated bytes in output */
Conn_ResetWCounter();