X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fhash.c;h=aa264ddb158500431bc94d4830e4d9b00e48a4bc;hb=1570a04e15bec6b2945e4351b1e05211aecdcacc;hp=de8e8b362c7cf309846216e35e6410c0ff96152f;hpb=b95f40f9ed63623ca230165e95cdc77ae6d1e2a6;p=ircu2.10.12-pk.git diff --git a/ircd/hash.c b/ircd/hash.c index de8e8b3..aa264dd 100644 --- a/ircd/hash.c +++ b/ircd/hash.c @@ -30,6 +30,7 @@ #include "ircd_reply.h" #include "ircd_string.h" #include "ircd.h" +#include "match.h" #include "msg.h" #include "numeric.h" #include "random.h" @@ -408,6 +409,20 @@ void clearNickJupes(void) jupeTable[i][0] = '\000'; } +/** Report all nick jupes to a user. + * @param[in] to Client requesting statistics. + * @param[in] sd Stats descriptor for request (ignored). + * @param[in] param Extra parameter from user (ignored). + */ +void +stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param) +{ + int i; + for (i = 0; i < JUPEHASHSIZE; i++) + if (jupeTable[i][0]) + send_reply(to, RPL_STATSJLINE, jupeTable[i]); +} + /** Send more channels to a client in mid-LIST. * @param[in] cptr Client to send the list to. */ @@ -426,6 +441,10 @@ void list_next_channels(struct Client *cptr) && chptr->users < args->max_users && chptr->creationtime > args->min_time && chptr->creationtime < args->max_time + && (!args->wildcard[0] || (args->flags & LISTARG_NEGATEWILDCARD) || + (!match(args->wildcard, chptr->chname))) + && (!(args->flags & LISTARG_NEGATEWILDCARD) || + match(args->wildcard, chptr->chname)) && (!(args->flags & LISTARG_TOPICLIMITS) || (chptr->topic[0] && chptr->topic_time > args->min_topic_time @@ -433,7 +452,17 @@ void list_next_channels(struct Client *cptr) && ((args->flags & LISTARG_SHOWSECRET) || ShowChannel(cptr, chptr))) { - send_reply(cptr, RPL_LIST, chptr->chname, chptr->users, chptr->topic); + if (args->flags & LISTARG_SHOWMODES) { + char modebuf[MODEBUFLEN]; + char parabuf[MODEBUFLEN]; + + modebuf[0] = modebuf[1] = parabuf[0] = '\0'; + channel_modes(cptr, modebuf, parabuf, sizeof(parabuf), chptr, NULL); + send_reply(cptr, RPL_LIST | SND_EXPLICIT, "%s %u %s %s :%s", + chptr->chname, chptr->users, modebuf, parabuf, chptr->topic); + } else { + send_reply(cptr, RPL_LIST, chptr->chname, chptr->users, chptr->topic); + } } } /* If, at the end of the bucket, client sendq is more than half