From d8b8b42cfcd1cb8a5c73dcc1d294566a6e0bacba Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 1 May 2014 20:53:54 +0000 Subject: - Backported /list and hunt_server() optimization from TRUNK git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@3462 82007160-df01-0410-b94d-b575c5fd34c7 --- src/hash.c | 3 ++- src/s_serv.c | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/hash.c b/src/hash.c index 6b7530a..48a20e2 100644 --- a/src/hash.c +++ b/src/hash.c @@ -769,8 +769,9 @@ list_one_channel(struct Client *source_p, struct Channel *chptr, char parabuf[MODEBUFLEN] = ""; if (SecretChannel(chptr) && - !(IsMember(source_p, chptr) || HasUMode(source_p, UMODE_ADMIN))) + !(HasUMode(source_p, UMODE_ADMIN) || IsMember(source_p, chptr))) return; + if (dlink_list_length(&chptr->members) < list_task->users_min || dlink_list_length(&chptr->members) > list_task->users_max || (chptr->channelts != 0 && diff --git a/src/s_serv.c b/src/s_serv.c index 3305dc2..c516fd9 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -165,7 +165,6 @@ hunt_server(struct Client *client_p, struct Client *source_p, const char *comman struct Client *target_p = NULL; struct Client *target_tmp = NULL; dlink_node *ptr; - int wilds; /* Assume it's me, if no server */ if (parc <= server || EmptyString(parv[server])) @@ -191,14 +190,12 @@ hunt_server(struct Client *client_p, struct Client *source_p, const char *comman if (target_p->from == source_p->from && !MyConnect(target_p)) target_p = NULL; - wilds = has_wildcards(parv[server]); - /* Again, if there are no wild cards involved in the server * name, use the hash lookup */ if (target_p == NULL) { - if (!wilds) + if (!has_wildcards(parv[server])) { if (!(target_p = hash_find_server(parv[server]))) { -- cgit