This patch exempts channel services from client_can_send_to_channel() checks 
and then removes the (now) unneeded checks for [!]IsChannelService().

~reed
Index: ChangeLog
===================================================================
RCS file: /cvsroot/undernet-ircu/ircu2.10/ChangeLog,v
retrieving revision 1.290.2.129.2.13
diff -b -u -d -r1.290.2.129.2.13 ChangeLog
--- ChangeLog	7 Nov 2003 00:37:31 -0000	1.290.2.129.2.13
+++ ChangeLog	7 Nov 2003 04:37:58 -0000
@@ -1,3 +1,12 @@
+2003-11-06  Reed Loden  <[EMAIL PROTECTED]>
+
+	* ircd/channel.c (client_can_send_to_channel): Exempt channel
+	services from the client_can_send_to_channel() check.
+
+	* ircd/ircd_relay.c: Remove the (now) redundant
+	[!]IsChannelService() checks from if() statements that include
+	client_can_send_to_channel().
+
 2003-11-06 Isomer <[EMAIL PROTECTED]>
 	* include/gline.c: a^b vs !(a^b)
 
Index: ircd/channel.c
===================================================================
RCS file: /cvsroot/undernet-ircu/ircu2.10/ircd/channel.c,v
retrieving revision 1.73.2.14.2.1
diff -b -u -d -r1.73.2.14.2.1 channel.c
--- ircd/channel.c	5 Nov 2003 09:19:43 -0000	1.73.2.14.2.1
+++ ircd/channel.c	7 Nov 2003 04:37:58 -0000
@@ -644,9 +644,9 @@
   struct Membership *member;
   assert(0 != cptr); 
   /*
-   * Servers can always speak on channels.
+   * Servers and channel services can always speak on channels.
    */
-  if (IsServer(cptr))
+  if (IsServer(cptr) || IsChannelService(cptr))
     return 1;
 
   member = find_channel_member(cptr, chptr);
Index: ircd/ircd_relay.c
===================================================================
RCS file: /cvsroot/undernet-ircu/ircu2.10/ircd/ircd_relay.c,v
retrieving revision 1.8.2.2
diff -b -u -d -r1.8.2.2 ircd_relay.c
--- ircd/ircd_relay.c	10 Oct 2002 09:13:25 -0000	1.8.2.2
+++ ircd/ircd_relay.c	7 Nov 2003 04:37:58 -0000
@@ -119,9 +119,8 @@
   }
   /*
    * This first: Almost never a server/service
-   * Servers may have channel services, need to check for it here
    */
-  if (client_can_send_to_channel(sptr, chptr) || IsChannelService(sptr)) {
+  if (client_can_send_to_channel(sptr, chptr)) {
     sendcmdto_channel_butone(sptr, CMD_PRIVATE, chptr, cli_from(sptr),
 			     SKIP_DEAF | SKIP_BURST, "%H :%s", chptr, text);
   }
@@ -140,9 +139,8 @@
     return;
   /*
    * This first: Almost never a server/service
-   * Servers may have channel services, need to check for it here
    */
-  if (client_can_send_to_channel(sptr, chptr) || IsChannelService(sptr)) {
+  if (client_can_send_to_channel(sptr, chptr)) {
     sendcmdto_channel_butone(sptr, CMD_NOTICE, chptr, cli_from(sptr),
 			     SKIP_DEAF | SKIP_BURST, "%H :%s", chptr, text);
   }

Reply via email to