X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_asll.c;h=f8ec56066ae365e5c643aa1ce29da09eaa3d360a;hb=refs%2Fheads%2Fupstream-ssl;hp=cfe1e412d003a6b0e61fbddcf223350fbe6b2e37;hpb=fc21303989a07d6091ef684150db29c49f682614;p=ircu2.10.12-pk.git diff --git a/ircd/m_asll.c b/ircd/m_asll.c index cfe1e41..f8ec560 100644 --- a/ircd/m_asll.c +++ b/ircd/m_asll.c @@ -115,6 +115,7 @@ int ms_asll(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { char *mask; struct Client *acptr; + int hits; int i; if (parc < 2) @@ -135,14 +136,16 @@ int ms_asll(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) return 0; mask = parv[1]; - for (i = 0; i <= HighestFd; i++) { + for (i = hits = 0; i <= HighestFd; i++) { acptr = LocalClientArray[i]; if (!acptr || !IsServer(acptr) || !MyConnect(acptr) || match(mask, cli_name(acptr))) continue; sendcmdto_prio_one(&me, CMD_ASLL, sptr, "%C %s %i %i %i", sptr, cli_name(acptr), cli_serv(acptr)->asll_rtt, cli_serv(acptr)->asll_to, cli_serv(acptr)->asll_from); + hits++; } + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :AsLL for %s: %d local servers matched", sptr, mask, hits); return 0; } @@ -153,6 +156,7 @@ int mo_asll(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { char *mask; struct Client *acptr; + int hits; int i; if (parc < 2) @@ -165,12 +169,14 @@ int mo_asll(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) return 0; mask = parv[1]; - for (i = 0; i <= HighestFd; i++) { + for (i = hits = 0; i <= HighestFd; i++) { acptr = LocalClientArray[i]; if (!acptr || !IsServer(acptr) || !MyConnect(acptr) || match(mask, cli_name(acptr))) continue; send_asll_reply(&me, sptr, cli_name(acptr), cli_serv(acptr)->asll_rtt, cli_serv(acptr)->asll_to, cli_serv(acptr)->asll_from); + hits++; } + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :AsLL for %s: %d local servers matched", sptr, mask, hits); return 0; }