-
-
-
-
-
-
-
-
-
- chanrec* Ptr = NULL;
- char tmp[10];
-
- if (pcnt == 1)
- {
- if ((IS_SINGLE(parameters[0],'0')) || (IS_SINGLE(parameters[0],'*')))
- {
- if ((user->chans.size()) && (((ucrec*)*(user->chans.begin()))->channel))
- {
- int n_list = 0;
- for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
- {
- Ptr = ((ucrec*)*(i->second->chans.begin()))->channel;
- // suggested by phidjit and FCS
- if ((!common_channels(user,i->second)) && (isnick(i->second->nick)))
- {
- // Bug Fix #29
- *tmp = 0;
- if (*i->second->awaymsg) {
- charlcat(tmp, 'G', 9);
- } else {
- charlcat(tmp, 'H', 9);
- }
- if (*i->second->oper) { charlcat(tmp, '*', 9); }
- WriteServ(user->fd,"352 %s %s %s %s %s %s %s :0 %s",user->nick, Ptr ? Ptr->name : "*", i->second->ident, i->second->dhost, i->second->server, i->second->nick, tmp, i->second->fullname);
- if (n_list++ > Config->MaxWhoResults)
- {
- WriteServ(user->fd,"523 %s WHO :Command aborted: More results than configured limit",user->nick);
- break;
- }
- }
- }
- }
- if (Ptr)
- {
- WriteServ(user->fd,"315 %s %s :End of /WHO list.",user->nick , parameters[0]);
- }
- else
- {
- WriteServ(user->fd,"315 %s %s :End of /WHO list.",user->nick, parameters[0]);
- }
- return;
- }
- if (parameters[0][0] == '#')