filter: send a numeric error for ACT_DROP
This commit is contained in:
parent
81e41406f4
commit
7bb7f89911
2 changed files with 11 additions and 3 deletions
|
@ -143,7 +143,7 @@
|
|||
#define NUMERIC_STR_401 "%s :No such nick/channel"
|
||||
#define NUMERIC_STR_402 "%s :No such server"
|
||||
#define NUMERIC_STR_403 "%s :No such channel"
|
||||
#define NUMERIC_STR_404 "%s :Cannot send to channel"
|
||||
#define NUMERIC_STR_404 "%s :Cannot send to nick/channel"
|
||||
#define NUMERIC_STR_405 ":%s 405 %s %s :You have joined too many channels"
|
||||
#define NUMERIC_STR_406 ":%s :There was no such nickname"
|
||||
#define NUMERIC_STR_407 ":%s 407 %s %s :Too many recipients."
|
||||
|
|
|
@ -331,7 +331,10 @@ filter_msg_user(void *data_)
|
|||
text);
|
||||
unsigned r = match_message(check_buffer);
|
||||
rb_free(text);
|
||||
if (r & (ACT_DROP | ACT_KILL)) {
|
||||
if (r & ACT_DROP) {
|
||||
sendto_one_numeric(s, ERR_CANNOTSENDTOCHAN,
|
||||
form_str(ERR_CANNOTSENDTOCHAN),
|
||||
data->target_p->name);
|
||||
data->approved = 1;
|
||||
}
|
||||
if (r & ACT_ALARM) {
|
||||
|
@ -340,6 +343,7 @@ filter_msg_user(void *data_)
|
|||
s->name, s->username, s->host, s->sockhost);
|
||||
}
|
||||
if (r & ACT_KILL) {
|
||||
data->approved = 1;
|
||||
exit_client(NULL, s, s, "Excess flood");
|
||||
}
|
||||
}
|
||||
|
@ -383,7 +387,10 @@ filter_msg_channel(void *data_)
|
|||
text);
|
||||
unsigned r = match_message(check_buffer);
|
||||
rb_free(text);
|
||||
if (r & (ACT_DROP | ACT_KILL)) {
|
||||
if (r & ACT_DROP) {
|
||||
sendto_one_numeric(s, ERR_CANNOTSENDTOCHAN,
|
||||
form_str(ERR_CANNOTSENDTOCHAN),
|
||||
data->chptr->chname);
|
||||
data->approved = 1;
|
||||
}
|
||||
if (r & ACT_ALARM) {
|
||||
|
@ -392,6 +399,7 @@ filter_msg_channel(void *data_)
|
|||
s->name, s->username, s->host, s->sockhost);
|
||||
}
|
||||
if (r & ACT_KILL) {
|
||||
data->approved = 1;
|
||||
exit_client(NULL, s, s, "Excess flood");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue