Author: Greg Sikorski <gte@atomicrevs.demon.co.uk>
authorGreg Sikorski <gte@atomicrevs.demon.co.uk>
Sun, 4 Jun 2000 05:19:30 +0000 (05:19 +0000)
committerGreg Sikorski <gte@atomicrevs.demon.co.uk>
Sun, 4 Jun 2000 05:19:30 +0000 (05:19 +0000)
commitce337ba88ba195b227375a01aecdeb1d56e79f1f
tree04ed8898989efaeae8c36278de828d878bee2c54
parent8def99fde8ed83010706032037277be93dc2494e
Author: Greg Sikorski <gte@atomicrevs.demon.co.uk>
Log message:

At present, a "/names #mychan" will iterate over the GlobalChannelList to produce
the reply.
It loops over all 25,000 channels each time someone does a /join #mychan (!)

This patch refactors /names to deal with the 2 special cases seperately, and
reduce the need for this wasted effort. (Will also try and get some gperf stats
ready soon).

Case 1. A standard /names #channel[,#channel2,#channel3 ...] - quick/simple lookup
        and list.

Case 2. A "/names 0", to list all the visibile channels & associated visible users
        followed by the remaining users not in any channels, or in secret channels.

Status:
Compiled, thoroughly testing.

Exploits such as /names 0,0,0,0,0,0,,,,,,,, [etc] are avoided, the routine drops
out after the first 0 encountered.

Testing needed:

Test remote /names, ensure invisible/secret chans aren't displayed anywhere they
shouldn't be.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@249 c9e4aea6-c8fd-4c43-8297-357d70d61c8c
ChangeLog
ircd/m_names.c