From 3d2fc110e35563ab29f97c6255adb4c9b0cafbe2 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Sat, 2 Apr 2016 19:45:27 -0500 Subject: [PATCH] authproc: add more API's for opm management --- include/authproc.h | 4 ++++ ircd/authproc.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/authproc.h b/include/authproc.h index 62f30fb9a..884983d14 100644 --- a/include/authproc.h +++ b/include/authproc.h @@ -54,10 +54,14 @@ void authd_abort_client(struct Client *); void add_blacklist(const char *host, const char *reason, uint8_t iptype, rb_dlink_list *filters); void del_blacklist(const char *host); void del_blacklist_all(void); + bool set_authd_timeout(const char *key, int timeout); void ident_check_enable(bool enabled); + void create_opm_listener(const char *ip, uint16_t port); void opm_check_enable(bool enabled); void create_opm_proxy_scanner(const char *type, uint16_t port); +void delete_opm_proxy_scanner(const char *type, uint16_t port); +void delete_opm_proxy_scanner_all(void); #endif diff --git a/ircd/authproc.c b/ircd/authproc.c index fbcd30491..58d665274 100644 --- a/ircd/authproc.c +++ b/ircd/authproc.c @@ -597,7 +597,7 @@ create_opm_listener(const char *ip, uint16_t port) void opm_check_enable(bool enabled) { - rb_helper_write(authd_helper, "O opm_enable %d", enabled ? 1 : 0); + rb_helper_write(authd_helper, "O opm_enabled %d", enabled ? 1 : 0); } /* Create an OPM proxy scanner */ @@ -606,3 +606,15 @@ create_opm_proxy_scanner(const char *type, uint16_t port) { rb_helper_write(authd_helper, "O opm_scanner %s %hu", type, port); } + +void +delete_opm_proxy_scanner(const char *type, uint16_t port) +{ + rb_helper_write(authd_helper, "O opm_scanner_del %s %hu", type, port); +} + +void +delete_opm_proxy_scanner_all(void) +{ + rb_helper_write(authd_helper, "O opm_scanner_del_all"); +}