commit - d2d867ea36b57c594546c5486aa8c2d4ef199af0
commit + 2205227c3b3cbc8788bcf97a037c9e3016f71c9c
blob - 6ec184a7caca3011eecae4697683fbaa4a4bbd77
blob + 6eb8d9421922e8606e0e5cbd83729f1c90c7d4b5
--- 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);
is_visible = strchr(client_modes, 'i') == NULL;
if (is_member || is_visible) {
- if (IRC_CheckListTooBig(Client, count, MAX_RPL_WHO, "WHO"))
- break;
-
strcpy(flags, who_flags_status(client_modes));
if (is_ircop)
strlcat(flags, "*", sizeof(flags));
count++;
}
}
+
+ /* If there are a lot of clients, augment penalty a bit */
+ if (count > MAX_RPL_WHO)
+ IRC_SetPenalty(Client, 1);
+
return IRC_WriteStrClient(Client, RPL_ENDOFWHO_MSG, Client_ID(Client),
Channel_Name(Chan));
}
if (Mask)
ngt_LowerStr(Mask);
+ IRC_SetPenalty(Client, 3);
for (c = Client_First(); c != NULL; c = Client_Next(c)) {
if (Client_Type(c) != CLIENT_USER)
continue;
chan = Channel_Search(Req->argv[0]);
if (chan) {
/* Members of a channel have been requested */
- IRC_SetPenalty(Client, 1);
return IRC_WHO_Channel(Client, chan, only_ops);
}
if (strcmp(Req->argv[0], "0") != 0) {
/* A mask has been given. But please note this RFC
* stupidity: "0" is same as no arguments ... */
- IRC_SetPenalty(Client, 3);
return IRC_WHO_Mask(Client, Req->argv[0], only_ops);
}
}