From b6a3d801291bcfb036f6f4eeeb467c7523d9dca7 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Sun, 7 Mar 2010 17:03:12 -0500 Subject: [PATCH] Change many of the ERR_CANNOTSENDTOCHAN messages to say WHY the user can not send to the channel for the new chmodes. --- modules/core/m_message.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/core/m_message.c b/modules/core/m_message.c index 0101500..d615e8b 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -508,8 +508,7 @@ msg_channel(int p_or_n, const char *command, if(!(strcmp(md->value, text2))) { if(p_or_n != NOTICE) - sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN, - form_str(ERR_CANNOTSENDTOCHAN), chptr->chname); + sendto_one_numeric(source_p, 404, "%s :Cannot send to channel - Message blocked due to repeating (+K set)", chptr->chname); return; } } @@ -548,23 +547,20 @@ msg_channel(int p_or_n, const char *command, } if(((caps*100)/(len)) >= 50) { - sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN, - form_str(ERR_CANNOTSENDTOCHAN), chptr->chname); + sendto_one_numeric(source_p, 404, "%s :Cannot send to channel - Your message contains mostly capital letters (+G set)", chptr->chname); return; } } if (p_or_n != PRIVMSG && chptr->mode.mode & MODE_NONOTICE && (!ConfigChannel.exempt_cmode_T || !is_any_op(msptr))) { - sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN, - form_str(ERR_CANNOTSENDTOCHAN), chptr->chname); + sendto_one_numeric(source_p, 404, "%s :Cannot send to channel - Notices are disallowed (+T set)", chptr->chname); return; } if (p_or_n != NOTICE && chptr->mode.mode & MODE_NOACTION && !strncasecmp(text + 1, "ACTION", 6) && (!ConfigChannel.exempt_cmode_D || !is_any_op(msptr))) { - sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN, - form_str(ERR_CANNOTSENDTOCHAN), chptr->chname); + sendto_one_numeric(source_p, 404, "%s :Cannot send to channel - ACTIONs are disallowed (+D set)", chptr->chname); return; } if (p_or_n != NOTICE && *text == '\001' && @@ -572,8 +568,7 @@ msg_channel(int p_or_n, const char *command, { if (chptr->mode.mode & MODE_NOCTCP && (!ConfigChannel.exempt_cmode_C || !is_any_op(msptr))) { - sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN, - form_str(ERR_CANNOTSENDTOCHAN), chptr->chname); + sendto_one_numeric(source_p, 404, "%s :Cannot send to channel - CTCPs to this channel are disallowed (+C set)", chptr->chname); return; } else if (rb_dlink_list_length(&chptr->locmembers) > (unsigned)(GlobalSetOptions.floodcount / 2))