Attempt to fix SF bug #2568366 (sending JOIN before hitting a target limit).
[ircu2.10.12-pk.git] / ircd / m_wallvoices.c
index c5d0461dab54fc7b1ba0e9a733d92543de83b8cb..a0dcd0e65d8feb2fd5379f54acffbb719d1fac41 100644 (file)
@@ -114,10 +114,11 @@ int m_wallvoices(struct Client* cptr, struct Client* sptr, int parc, char* parv[
     return send_reply(sptr, ERR_NOTEXTTOSEND);
 
   if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) {
-    if (client_can_send_to_channel(sptr, chptr, 1)) {
+    if (client_can_send_to_channel(sptr, chptr, 0)) {
       if ((chptr->mode.mode & MODE_NOPRIVMSGS) &&
           check_target_limit(sptr, chptr, chptr->chname, 0))
         return 0;
+      RevealDelayedJoinIfNeeded(sptr, chptr);
       sendcmdto_channel_butone(sptr, CMD_WALLVOICES, chptr, cptr,
                               SKIP_DEAF | SKIP_BURST | SKIP_NONVOICES, 
                               "%H :+ %s", chptr, parv[parc - 1]);