mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
authd: tag rejection type.
This commit is contained in:
parent
c2222d7e9a
commit
df32819e04
1 changed files with 19 additions and 1 deletions
|
@ -142,8 +142,26 @@ void provider_done(struct auth_client *auth, provider_t id)
|
|||
void reject_client(struct auth_client *auth, provider_t id, const char *reason)
|
||||
{
|
||||
uint16_t cid = auth->cid;
|
||||
char reject;
|
||||
|
||||
rb_helper_write(authd_helper, "R %x :%s", auth->cid, reason);
|
||||
switch(id)
|
||||
{
|
||||
case PROVIDER_RDNS:
|
||||
reject = 'D';
|
||||
break;
|
||||
case PROVIDER_IDENT:
|
||||
reject = 'I';
|
||||
break;
|
||||
case PROVIDER_BLACKLIST:
|
||||
reject = 'B';
|
||||
break;
|
||||
case PROVIDER_NULL:
|
||||
default:
|
||||
reject = 'N';
|
||||
break;
|
||||
}
|
||||
|
||||
rb_helper_write(authd_helper, "R %x %c :%s", auth->cid, reject, reason);
|
||||
|
||||
unset_provider(auth, id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue