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