override: Allow banwalking too.
This commit is contained in:
parent
8bb19bd7ab
commit
d307688122
1 changed files with 20 additions and 0 deletions
|
@ -24,10 +24,12 @@
|
||||||
|
|
||||||
static void check_umode_change(void *data);
|
static void check_umode_change(void *data);
|
||||||
static void hack_channel_access(void *data);
|
static void hack_channel_access(void *data);
|
||||||
|
static void hack_can_join(void *data);
|
||||||
|
|
||||||
mapi_hfn_list_av1 override_hfnlist[] = {
|
mapi_hfn_list_av1 override_hfnlist[] = {
|
||||||
{ "umode_changed", (hookfn) check_umode_change },
|
{ "umode_changed", (hookfn) check_umode_change },
|
||||||
{ "get_channel_access", (hookfn) hack_channel_access },
|
{ "get_channel_access", (hookfn) hack_channel_access },
|
||||||
|
{ "can_join", (hookfn) hack_can_join },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,6 +158,24 @@ hack_channel_access(void *vdata)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
hack_can_join(void *vdata)
|
||||||
|
{
|
||||||
|
hook_data_channel *data = (hook_data_channel *) vdata;
|
||||||
|
|
||||||
|
if (data->approved == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (data->client->umodes & user_modes['p'])
|
||||||
|
{
|
||||||
|
update_session_deadline(data->client, NULL);
|
||||||
|
data->approved = 0;
|
||||||
|
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using oper-override on %s (banwalking)",
|
||||||
|
get_oper_name(data->client), data->chptr->chname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct ev_entry *expire_override_deadlines_ev = NULL;
|
struct ev_entry *expire_override_deadlines_ev = NULL;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue