]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/core/m_message.c
Put back fb7d6089158e, not setting large_ctcp_sent for CTCP ACTION.
[irc/rqf/shadowircd.git] / modules / core / m_message.c
index c89325038f371b03baf279ff3df74b64b5049b6c..3f814f6585117702075a47ffff372ee44df813a6 100644 (file)
@@ -513,11 +513,20 @@ msg_channel(int p_or_n, const char *command,
                if(result == CAN_SEND_OPV ||
                   !flood_attack_channel(p_or_n, source_p, chptr, chptr->chname))
                {
+                       if (p_or_n != NOTICE && *text == '\001' &&
+                                       strncasecmp(text + 1, "ACTION", 6))
+                       {
+                               if (chptr->mode.mode & MODE_NOCTCP)
+                               {
+                                       sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN,
+                                                          form_str(ERR_CANNOTSENDTOCHAN), chptr->chname);
+                                       return;
+                               }
+                               else if (rb_dlink_list_length(&chptr->locmembers) > (unsigned)(GlobalSetOptions.floodcount / 2))
+                                       source_p->large_ctcp_sent = rb_current_time();
+                       }
                        sendto_channel_flags(client_p, ALL_MEMBERS, source_p, chptr,
                                             "%s %s :%s", command, chptr->chname, text);
-                       if (p_or_n != NOTICE && *text == '\001' &&
-                                       rb_dlink_list_length(&chptr->locmembers) > (unsigned)(GlobalSetOptions.floodcount / 2))
-                               source_p->large_ctcp_sent = rb_current_time();
                }
        }
        else if(chptr->mode.mode & MODE_OPMODERATE &&