]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
[svn] Remove channels entirely from /whois on services.
authorjilles <redacted>
Wed, 28 Mar 2007 13:49:57 +0000 (06:49 -0700)
committerjilles <redacted>
Wed, 28 Mar 2007 13:49:57 +0000 (06:49 -0700)
This cannot be overridden with operspy.

ChangeLog
include/serno.h
modules/m_whois.c

index c0522e7cc7f54ce37e775a0afd00cecc95ef8f7f..d02b7ced55b904678bd82ba59483a4910a69b93a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 06231a42994b9059da1c5e5d1655cdb055c4c725..31e4cd5a638d33ea5a8d12a6bf2297aa3f3dddad 100644 (file)
@@ -1 +1 @@
-#define SERNO "20070325-3281"
+#define SERNO "20070328-3283"
index ef60a550784987e0f6d145c65e5fe88bb972aecf..c139c29367404380b5b3f5089a153e54076ff30a 100644 (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;
+               DLINK_FOREACH(ptr, target_p->user->channel.head)
+               {
+                       msptr = ptr->data;
+                       chptr = msptr->chptr;
 
-               visible = IsService(target_p) ? IsMember(source_p, chptr) : ShowChannel(source_p, chptr);
+                       visible = ShowChannel(source_p, chptr);
 
-               if(visible || operspy)
-               {
-                       if((cur_len + strlen(chptr->chname) + 3) > (BUFSIZE - 5))
+                       if(visible || operspy)
                        {
-                               sendto_one(source_p, "%s", buf);
-                               cur_len = mlen + extra_space;
-                               t = buf + mlen;
+                               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;
                        }
-
-                       tlen = ircsprintf(t, "%s%s%s ",
-                                       visible ? "" : "!",
-                                       find_channel_status(msptr, 1),
-                                       chptr->chname);
-                       t += tlen;
-                       cur_len += tlen;
                }
        }