Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-11-15 03:22:26 UTC

Modified files:
     ChangeLog ircd/channel.c

Log message:

Always allow remote users to send to a channel.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.739 ircu2.10/ChangeLog:1.740
--- ircu2.10/ChangeLog:1.739    Mon Nov 14 19:13:22 2005
+++ ircu2.10/ChangeLog  Mon Nov 14 19:22:16 2005
@@ -1,3 +1,8 @@
+2005-11-14  Michael Poole <[EMAIL PROTECTED]>
+
+       * ircd/channel.c (member_can_send_to_channel): After prodding from
+       reed, always allow remote users to send to a channel.
+
 2005-11-14  Carlo Wood <[EMAIL PROTECTED]>
 
        * ircd/channel.c (modebuf_flush_int): Fix test for limitdel.
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.161 ircu2.10/ircd/channel.c:1.162
--- ircu2.10/ircd/channel.c:1.161       Mon Nov 14 19:13:22 2005
+++ ircu2.10/ircd/channel.c     Mon Nov 14 19:22:16 2005
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief Channel management and maintenance
- * @version $Id: channel.c,v 1.161 2005/11/15 03:13:22 entrope Exp $
+ * @version $Id: channel.c,v 1.162 2005/11/15 03:22:16 entrope Exp $
  */
 #include "config.h"
 
@@ -666,7 +666,7 @@
  *
  * @param member       The membership of the user
  * @param reveal       If true, the user will be "revealed" on a delayed
- *                     joined channel. 
+ *                     joined channel.
  *
  * @returns True if the client can speak on the channel.
  */
@@ -674,10 +674,18 @@
 {
   assert(0 != member);
 
-  /* Discourage using the Apass to get op.  They should use the upass. */
+  /* Do not check for users on other servers: This should be a
+   * temporary desynch, or maybe they are on an older server, but
+   * we do not want to send ERR_CANNOTSENDTOCHAN more than once.
+   */
+  if (!MyUser(member->user))
+    return 1;
+
+  /* Discourage using the Apass to get op.  They should use the Upass. */
   if (IsChannelManager(member) && member->channel->mode.apass[0])
     return 0;
 
+  /* If you have voice or ops, you can speak. */
   if (IsVoicedOrOpped(member))
     return 1;
 
@@ -687,15 +695,13 @@
    */
   if (member->channel->mode.mode & MODE_MODERATED)
     return 0;
+
   /* If only logged in users may join and you're not one, you can't speak. */
   if (member->channel->mode.mode & MODE_REGONLY && !IsAccount(member->user))
     return 0;
-  /*
-   * If you're banned then you can't speak either.
-   * but because of the amount of CPU time that is_banned chews
-   * we only check it for our clients.
-   */
-  if (MyUser(member->user) && is_banned(member))
+
+  /* If you're banned then you can't speak either. */
+  if (is_banned(member))
     return 0;
 
   if (IsDelayedJoin(member) && reveal)
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to