X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fwhocmds.c;h=0b166ba0bb0ebd7e8a0dbc94d4382a77efc952fc;hb=ce37acbb6cddd7366b24779050dceb490b484d65;hp=2cee53f2b48b299fc3f891d75d9c94fd25486a00;hpb=b88effbe1bf5b50ff15b3766d16e690178211b9b;p=ircu2.10.12-pk.git diff --git a/ircd/whocmds.c b/ircd/whocmds.c index 2cee53f..0b166ba 100644 --- a/ircd/whocmds.c +++ b/ircd/whocmds.c @@ -276,31 +276,3 @@ void do_who(struct Client* sptr, struct Client* acptr, struct Channel* repchan, p1 = buf1; send_reply(sptr, fields ? RPL_WHOSPCRPL : RPL_WHOREPLY, ++p1); } - -/** Count number of users who match \a mask. - * @param[in] mask user\@host or user\@ip mask to check. - * @return Count of matching users. - */ -int -count_users(char *mask) -{ - struct Client *acptr; - int count = 0; - char namebuf[USERLEN + HOSTLEN + 2]; - char ipbuf[USERLEN + SOCKIPLEN + 2]; - - for (acptr = GlobalClientList; acptr; acptr = cli_next(acptr)) { - if (!IsUser(acptr)) - continue; - - ircd_snprintf(0, namebuf, sizeof(namebuf), "%s@%s", - cli_user(acptr)->username, cli_user(acptr)->host); - ircd_snprintf(0, ipbuf, sizeof(ipbuf), "%s@%s", cli_user(acptr)->username, - ircd_ntoa(&cli_ip(acptr))); - - if (!match(mask, namebuf) || !match(mask, ipbuf)) - count++; - } - - return count; -}