X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/105a4985b402b3ab294e3bec1fa75bac75430482..ea41b24fd4807e3565bf5f8f293e2efc4c20b62d:/modules/m_unreject.c diff --git a/modules/m_unreject.c b/modules/m_unreject.c index bb9e8c54..9bed1b1e 100644 --- a/modules/m_unreject.c +++ b/modules/m_unreject.c @@ -30,7 +30,10 @@ #include "modules.h" #include "send.h" -static int mo_unreject(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char unreject_desc[] = + "Provides the UNREJECT command to remove an IP from the reject cache"; + +static void mo_unreject(struct MsgBuf *, struct Client *, struct Client *, int, const char **); struct Message unreject_msgtab = { "UNREJECT", 0, 0, 0, 0, @@ -38,31 +41,30 @@ struct Message unreject_msgtab = { }; mapi_clist_av1 unreject_clist[] = { &unreject_msgtab, NULL }; -DECLARE_MODULE_AV2(unreject, NULL, NULL, unreject_clist, NULL, NULL, NULL, NULL, NULL); + +DECLARE_MODULE_AV2(unreject, NULL, NULL, unreject_clist, NULL, NULL, NULL, NULL, unreject_desc); /* * mo_unreject */ -static int +static void mo_unreject(struct MsgBuf *msgbuf_p, 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; + return; } if(!parse_netmask(parv[1], NULL, NULL)) { sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]); - return 0; + return; } 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; }