Apply colour stripping (cmode +c) to messages to @/+ channel as well.
This commit is contained in:
parent
755c144eb6
commit
60dd1febe2
1 changed files with 16 additions and 0 deletions
|
@ -630,6 +630,7 @@ static void
|
||||||
msg_channel_flags(int p_or_n, const char *command, struct Client *client_p,
|
msg_channel_flags(int p_or_n, const char *command, struct Client *client_p,
|
||||||
struct Client *source_p, struct Channel *chptr, int flags, const char *text)
|
struct Client *source_p, struct Channel *chptr, int flags, const char *text)
|
||||||
{
|
{
|
||||||
|
char text2[BUFSIZE];
|
||||||
int type;
|
int type;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
|
@ -651,6 +652,21 @@ msg_channel_flags(int p_or_n, const char *command, 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;
|
||||||
|
if (EmptyString(text))
|
||||||
|
{
|
||||||
|
/* could be empty after colour stripping and
|
||||||
|
* that would cause problems later */
|
||||||
|
if(p_or_n != NOTICE)
|
||||||
|
sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name, source_p->name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sendto_channel_flags(client_p, type, source_p, chptr, "%s %c%s :%s",
|
sendto_channel_flags(client_p, type, source_p, chptr, "%s %c%s :%s",
|
||||||
command, c, chptr->chname, text);
|
command, c, chptr->chname, text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue