mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
m_unreject.c fixed
This commit is contained in:
parent
a2d6ed4b25
commit
da1d5ec6b5
1 changed files with 24 additions and 26 deletions
|
@ -42,30 +42,28 @@ struct Message unreject_msgtab = {
|
||||||
mapi_clist_av1 unreject_clist[] = { &unreject_msgtab, NULL };
|
mapi_clist_av1 unreject_clist[] = { &unreject_msgtab, NULL };
|
||||||
DECLARE_MODULE_AV1(unreject, NULL, NULL, unreject_clist, NULL, NULL, "$Revision: 3161 $");
|
DECLARE_MODULE_AV1(unreject, NULL, NULL, unreject_clist, NULL, NULL, "$Revision: 3161 $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mo_unreject
|
* mo_unreject
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
mo_unreject(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
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 ||
|
if(ConfigFileEntry.reject_after_count == 0 || ConfigFileEntry.reject_duration == 0)
|
||||||
ConfigFileEntry.reject_duration == 0)
|
{
|
||||||
{
|
sendto_one_notice(source_p, ":Reject cache is disabled");
|
||||||
sendto_one_notice(source_p, ":Reject cache is disabled");
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
if(!parse_netmask(parv[1], NULL, NULL))
|
||||||
if(!parse_netmask(parv[1], NULL, NULL))
|
{
|
||||||
{
|
sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]);
|
||||||
sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]);
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
if(remove_reject(parv[1]))
|
||||||
if(remove_reject_ip(parv[1]))
|
sendto_one_notice(source_p, ":Removed reject for %s", parv[1]);
|
||||||
sendto_one_notice(source_p, ":Removed reject for %s", parv[1]);
|
else
|
||||||
else
|
sendto_one_notice(source_p, ":Unable to remove reject for %s", parv[1]);
|
||||||
sendto_one_notice(source_p, ":Unable to remove reject for %s", parv[1]);
|
return 0;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue