Apply patches #1197032, #1194116.
[ircu2.10.12-pk.git] / ircd / channel.c
index 633d28c14848b4db3899635a4bfbb2426e45a52b..ddb85d77d56a75cd32f65bbafd05f2e6434e5c37 100644 (file)
@@ -655,6 +655,9 @@ 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