From d1cf8afebd67ffcbe8158f893efec25f56c88853 Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Wed, 2 Apr 2008 15:28:55 +0400 Subject: [PATCH] m_unreject.c fixed --- modules/m_unreject.c | 50 +++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/modules/m_unreject.c b/modules/m_unreject.c index 21e136a..094e10d 100644 --- a/modules/m_unreject.c +++ b/modules/m_unreject.c @@ -42,30 +42,28 @@ struct Message unreject_msgtab = { mapi_clist_av1 unreject_clist[] = { &unreject_msgtab, NULL }; DECLARE_MODULE_AV1(unreject, NULL, NULL, unreject_clist, NULL, NULL, "$Revision: 3161 $"); -/* - * mo_unreject - * - */ -static int -mo_unreject(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) -{ - if(ConfigFileEntry.reject_after_count == 0 || ConfigFileEntry.reject_ban_time == 0 || - ConfigFileEntry.reject_duration == 0) - { - sendto_one_notice(source_p, ":Reject cache is disabled"); - return 0; - } - - if(!parse_netmask(parv[1], NULL, NULL)) - { - sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]); - return 0; - } - - if(remove_reject_ip(parv[1])) - sendto_one_notice(source_p, ":Removed reject for %s", parv[1]); - else - sendto_one_notice(source_p, ":Unable to remove reject for %s", parv[1]); - - return 0; +/* + * mo_unreject + * + */ +static int +mo_unreject(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) +{ + if(ConfigFileEntry.reject_after_count == 0 || ConfigFileEntry.reject_duration == 0) + { + sendto_one_notice(source_p, ":Reject cache is disabled"); + return 0; + } + + if(!parse_netmask(parv[1], NULL, NULL)) + { + sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]); + return 0; + } + + if(remove_reject(parv[1])) + sendto_one_notice(source_p, ":Removed reject for %s", parv[1]); + else + sendto_one_notice(source_p, ":Unable to remove reject for %s", parv[1]); + return 0; }