]> jfr.im git - solanum.git/blobdiff - modules/core/m_message.c
m_info: Correct description of general::client_exit like in example confs.
[solanum.git] / modules / core / m_message.c
index f99d8959455600458c586bfb80264241faa8f09a..daff1b5b0569d5bc8cd828d963f8d7f9bbb76fb3 100644 (file)
@@ -479,7 +479,6 @@ msg_channel(enum message_type msgtype,
            const char *text)
 {
        int result;
            const char *text)
 {
        int result;
-       char text2[BUFSIZE];
        hook_data_privmsg_channel hdata;
 
        if(MyClient(source_p))
        hook_data_privmsg_channel hdata;
 
        if(MyClient(source_p))
@@ -489,13 +488,6 @@ msg_channel(enum message_type msgtype,
                        source_p->localClient->last = rb_current_time();
        }
 
                        source_p->localClient->last = rb_current_time();
        }
 
-       if(chptr->mode.mode & MODE_NOCOLOR)
-       {
-               rb_strlcpy(text2, text, BUFSIZE);
-               strip_colour(text2);
-               text = text2;
-       }
-
        hdata.msgtype = msgtype;
        hdata.source_p = source_p;
        hdata.chptr = chptr;
        hdata.msgtype = msgtype;
        hdata.source_p = source_p;
        hdata.chptr = chptr;
@@ -534,18 +526,6 @@ msg_channel(enum message_type msgtype,
                if(result == CAN_SEND_OPV ||
                   !flood_attack_channel(msgtype, source_p, chptr, chptr->chname))
                {
                if(result == CAN_SEND_OPV ||
                   !flood_attack_channel(msgtype, source_p, chptr, chptr->chname))
                {
-                       if (msgtype != MESSAGE_TYPE_NOTICE && *text == '\001' &&
-                                       strncasecmp(text + 1, "ACTION ", 7))
-                       {
-                               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", cmdname[msgtype], chptr->chname, text);
                }
                        sendto_channel_flags(client_p, ALL_MEMBERS, source_p, chptr,
                                             "%s %s :%s", cmdname[msgtype], chptr->chname, text);
                }
@@ -591,16 +571,8 @@ msg_channel_opmod(enum message_type msgtype,
                  struct Client *client_p, struct Client *source_p,
                  struct Channel *chptr, const char *text)
 {
                  struct Client *client_p, struct Client *source_p,
                  struct Channel *chptr, const char *text)
 {
-       char text2[BUFSIZE];
        hook_data_privmsg_channel hdata;
 
        hook_data_privmsg_channel hdata;
 
-       if(chptr->mode.mode & MODE_NOCOLOR)
-       {
-               rb_strlcpy(text2, text, BUFSIZE);
-               strip_colour(text2);
-               text = text2;
-       }
-
        hdata.msgtype = msgtype;
        hdata.source_p = source_p;
        hdata.chptr = chptr;
        hdata.msgtype = msgtype;
        hdata.source_p = source_p;
        hdata.chptr = chptr;
@@ -660,7 +632,6 @@ static void
 msg_channel_flags(enum message_type msgtype, struct Client *client_p,
                  struct Client *source_p, struct Channel *chptr, int flags, const char *text)
 {
 msg_channel_flags(enum message_type msgtype, struct Client *client_p,
                  struct Client *source_p, struct Channel *chptr, int flags, const char *text)
 {
-       char text2[BUFSIZE];
        int type;
        char c;
        hook_data_privmsg_channel hdata;
        int type;
        char c;
        hook_data_privmsg_channel hdata;
@@ -683,13 +654,6 @@ msg_channel_flags(enum message_type msgtype, struct Client *client_p,
                        source_p->localClient->last = rb_current_time();
        }
 
                        source_p->localClient->last = rb_current_time();
        }
 
-       if(chptr->mode.mode & MODE_NOCOLOR)
-       {
-               rb_strlcpy(text2, text, BUFSIZE);
-               strip_colour(text2);
-               text = text2;
-       }
-
        hdata.msgtype = msgtype;
        hdata.source_p = source_p;
        hdata.chptr = chptr;
        hdata.msgtype = msgtype;
        hdata.source_p = source_p;
        hdata.chptr = chptr;
@@ -713,25 +677,6 @@ msg_channel_flags(enum message_type msgtype, struct Client *client_p,
                return;
        }
 
                return;
        }
 
-       if (msgtype != MESSAGE_TYPE_NOTICE && *text == '\001' &&
-                       strncasecmp(text + 1, "ACTION ", 7))
-       {
-               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))
-               {
-                       /* This overestimates the number of users the CTCP
-                        * is being sent to, so large_ctcp_sent might be
-                        * set inappropriately. This should not be a problem.
-                        */
-                       source_p->large_ctcp_sent = rb_current_time();
-               }
-       }
-
        sendto_channel_flags(client_p, type, source_p, chptr, "%s %c%s :%s",
                             cmdname[msgtype], c, chptr->chname, text);
 }
        sendto_channel_flags(client_p, type, source_p, chptr, "%s %c%s :%s",
                             cmdname[msgtype], c, chptr->chname, text);
 }