[svn] Remove channels entirely from /whois on services.

This cannot be overridden with operspy.
This commit is contained in:
jilles 2007-03-28 06:49:57 -07:00
parent 4cda5f2264
commit 04513cff6c
3 changed files with 34 additions and 22 deletions

View file

@ -1,3 +1,12 @@
jilles 2007/03/28 13:11:30 UTC (20070328-3283)
Log:
Fix /who on channels with ** in their name.
Changes: Modified:
+2 -2 trunk/modules/m_who.c (File Modified)
jilles 2007/03/25 17:59:50 UTC (20070325-3281)
Log:
NEWS: As in 2.1.3, mention that the TS6 revision will

View file

@ -1 +1 @@
#define SERNO "20070325-3281"
#define SERNO "20070328-3283"

View file

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_whois.c 1879 2006-08-27 21:18:43Z jilles $
* $Id: m_whois.c 3287 2007-03-28 13:49:57Z jilles $
*/
#include "stdinc.h"
@ -67,7 +67,7 @@ mapi_hlist_av1 whois_hlist[] = {
{ NULL, NULL }
};
DECLARE_MODULE_AV1(whois, NULL, NULL, whois_clist, whois_hlist, NULL, "$Revision: 1879 $");
DECLARE_MODULE_AV1(whois, NULL, NULL, whois_clist, whois_hlist, NULL, "$Revision: 3287 $");
/*
* m_whois
@ -280,28 +280,31 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
t = buf + mlen;
DLINK_FOREACH(ptr, target_p->user->channel.head)
if (!IsService(target_p))
{
msptr = ptr->data;
chptr = msptr->chptr;
visible = IsService(target_p) ? IsMember(source_p, chptr) : ShowChannel(source_p, chptr);
if(visible || operspy)
DLINK_FOREACH(ptr, target_p->user->channel.head)
{
if((cur_len + strlen(chptr->chname) + 3) > (BUFSIZE - 5))
{
sendto_one(source_p, "%s", buf);
cur_len = mlen + extra_space;
t = buf + mlen;
}
msptr = ptr->data;
chptr = msptr->chptr;
tlen = ircsprintf(t, "%s%s%s ",
visible ? "" : "!",
find_channel_status(msptr, 1),
chptr->chname);
t += tlen;
cur_len += tlen;
visible = ShowChannel(source_p, chptr);
if(visible || operspy)
{
if((cur_len + strlen(chptr->chname) + 3) > (BUFSIZE - 5))
{
sendto_one(source_p, "%s", buf);
cur_len = mlen + extra_space;
t = buf + mlen;
}
tlen = ircsprintf(t, "%s%s%s ",
visible ? "" : "!",
find_channel_status(msptr, 1),
chptr->chname);
t += tlen;
cur_len += tlen;
}
}
}