diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-05-01 20:53:54 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-05-01 20:53:54 +0000 |
commit | d8b8b42cfcd1cb8a5c73dcc1d294566a6e0bacba (patch) | |
tree | e7afb1f3441f18d9f1f1f3a32b9e398a7f6fe8f5 /src | |
parent | bc8bd6f09056aa4400e2a65a4bfe2c0acc8e9127 (diff) |
- 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
Diffstat (limited to 'src')
-rw-r--r-- | src/hash.c | 3 | ||||
-rw-r--r-- | src/s_serv.c | 5 |
2 files changed, 3 insertions, 5 deletions
@@ -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]))) { |