filter: send the failure response only on PRIVMSG
This commit is contained in:
parent
744ac30804
commit
d928bc7af3
1 changed files with 10 additions and 6 deletions
|
@ -337,9 +337,11 @@ filter_msg_user(void *data_)
|
||||||
unsigned r = match_message("0", s, cmdname[data->msgtype], "0", data->text) |
|
unsigned r = match_message("0", s, cmdname[data->msgtype], "0", data->text) |
|
||||||
match_message("1", s, cmdname[data->msgtype], "0", text);
|
match_message("1", s, cmdname[data->msgtype], "0", text);
|
||||||
if (r & ACT_DROP) {
|
if (r & ACT_DROP) {
|
||||||
sendto_one_numeric(s, ERR_CANNOTSENDTOCHAN,
|
if (data->msgtype == MESSAGE_TYPE_PRIVMSG) {
|
||||||
form_str(ERR_CANNOTSENDTOCHAN),
|
sendto_one_numeric(s, ERR_CANNOTSENDTOCHAN,
|
||||||
data->target_p->name);
|
form_str(ERR_CANNOTSENDTOCHAN),
|
||||||
|
data->target_p->name);
|
||||||
|
}
|
||||||
data->approved = 1;
|
data->approved = 1;
|
||||||
}
|
}
|
||||||
if (r & ACT_ALARM) {
|
if (r & ACT_ALARM) {
|
||||||
|
@ -373,9 +375,11 @@ filter_msg_channel(void *data_)
|
||||||
unsigned r = match_message("0", s, cmdname[data->msgtype], data->chptr->chname, data->text) |
|
unsigned r = match_message("0", s, cmdname[data->msgtype], data->chptr->chname, data->text) |
|
||||||
match_message("1", s, cmdname[data->msgtype], data->chptr->chname, text);
|
match_message("1", s, cmdname[data->msgtype], data->chptr->chname, text);
|
||||||
if (r & ACT_DROP) {
|
if (r & ACT_DROP) {
|
||||||
sendto_one_numeric(s, ERR_CANNOTSENDTOCHAN,
|
if (data->msgtype == MESSAGE_TYPE_PRIVMSG) {
|
||||||
form_str(ERR_CANNOTSENDTOCHAN),
|
sendto_one_numeric(s, ERR_CANNOTSENDTOCHAN,
|
||||||
data->chptr->chname);
|
form_str(ERR_CANNOTSENDTOCHAN),
|
||||||
|
data->chptr->chname);
|
||||||
|
}
|
||||||
data->approved = 1;
|
data->approved = 1;
|
||||||
}
|
}
|
||||||
if (r & ACT_ALARM) {
|
if (r & ACT_ALARM) {
|
||||||
|
|
Loading…
Reference in a new issue