Always allow remote users to send to a channel.
authorMichael Poole <mdpoole@troilus.org>
Tue, 15 Nov 2005 03:22:16 +0000 (03:22 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 15 Nov 2005 03:22:16 +0000 (03:22 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1554 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/channel.c

index 5ea102d84be21b23adc3ede7130e7e58f56396a2..783886b0596d8268549814542804dcae5d15a41e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-14  Michael Poole <mdpoole@troilus.org>
+
+       * 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 <run@alinoe.com>
 
        * ircd/channel.c (modebuf_flush_int): Fix test for limitdel.
index ae27daedc4c6f98187d3fa8369655a9a0c5d07b9..6502c49fa23e12957906891e685aea20b62ea748 100644 (file)
@@ -666,7 +666,7 @@ int has_voice(struct Client* cptr, struct Channel* chptr)
  *
  * @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 @@ int member_can_send_to_channel(struct Membership* member, int reveal)
 {
   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 @@ int member_can_send_to_channel(struct Membership* member, int reveal)
    */
   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)