Remove redundant param to update_session_deadline
This commit is contained in:
parent
0abb79b706
commit
d58de35b83
1 changed files with 15 additions and 17 deletions
|
@ -55,10 +55,9 @@ struct OverrideSession {
|
||||||
rb_dlink_list overriding_opers = { NULL, NULL, 0 };
|
rb_dlink_list overriding_opers = { NULL, NULL, 0 };
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_session_deadline(struct Client *source_p, struct OverrideSession *session_p)
|
update_session_deadline(struct Client *source_p)
|
||||||
{
|
|
||||||
if (session_p == NULL)
|
|
||||||
{
|
{
|
||||||
|
struct OverrideSession *session_p = NULL;
|
||||||
rb_dlink_node *n;
|
rb_dlink_node *n;
|
||||||
|
|
||||||
RB_DLINK_FOREACH(n, overriding_opers.head)
|
RB_DLINK_FOREACH(n, overriding_opers.head)
|
||||||
|
@ -71,7 +70,6 @@ update_session_deadline(struct Client *source_p, struct OverrideSession *session
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (session_p != NULL)
|
if (session_p != NULL)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +133,7 @@ check_umode_change(void *vdata)
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
update_session_deadline(source_p, NULL);
|
update_session_deadline(source_p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (changed && !(source_p->umodes & user_modes['p']))
|
else if (changed && !(source_p->umodes & user_modes['p']))
|
||||||
|
@ -168,7 +166,7 @@ hack_channel_access(void *vdata)
|
||||||
|
|
||||||
if (data->client->umodes & user_modes['p'])
|
if (data->client->umodes & user_modes['p'])
|
||||||
{
|
{
|
||||||
update_session_deadline(data->client, NULL);
|
update_session_deadline(data->client);
|
||||||
data->approved = CHFL_OVERRIDE;
|
data->approved = CHFL_OVERRIDE;
|
||||||
|
|
||||||
/* we only want to report modehacks, which are always non-NULL */
|
/* we only want to report modehacks, which are always non-NULL */
|
||||||
|
@ -188,7 +186,7 @@ hack_can_join(void *vdata)
|
||||||
|
|
||||||
if (data->client->umodes & user_modes['p'])
|
if (data->client->umodes & user_modes['p'])
|
||||||
{
|
{
|
||||||
update_session_deadline(data->client, NULL);
|
update_session_deadline(data->client);
|
||||||
data->approved = 0;
|
data->approved = 0;
|
||||||
|
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using oper-override on %s (banwalking)",
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using oper-override on %s (banwalking)",
|
||||||
|
@ -208,7 +206,7 @@ hack_can_kick(void *vdata)
|
||||||
|
|
||||||
if (data->client->umodes & user_modes['p'])
|
if (data->client->umodes & user_modes['p'])
|
||||||
{
|
{
|
||||||
update_session_deadline(data->client, NULL);
|
update_session_deadline(data->client);
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using oper-override on %s (KICK %s)",
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using oper-override on %s (KICK %s)",
|
||||||
get_oper_name(data->client), data->chptr->chname, data->target->name);
|
get_oper_name(data->client), data->chptr->chname, data->target->name);
|
||||||
}
|
}
|
||||||
|
@ -231,7 +229,7 @@ hack_can_send(void *vdata)
|
||||||
|
|
||||||
if (MyClient(data->client))
|
if (MyClient(data->client))
|
||||||
{
|
{
|
||||||
update_session_deadline(data->client, NULL);
|
update_session_deadline(data->client);
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using oper-override on %s (forcing message)",
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is using oper-override on %s (forcing message)",
|
||||||
get_oper_name(data->client), data->chptr->chname);
|
get_oper_name(data->client), data->chptr->chname);
|
||||||
}
|
}
|
||||||
|
@ -272,7 +270,7 @@ _modinit(void)
|
||||||
{
|
{
|
||||||
struct Client *client_p = ptr->data;
|
struct Client *client_p = ptr->data;
|
||||||
if (IsPerson(client_p) && (client_p->umodes & user_modes['p']))
|
if (IsPerson(client_p) && (client_p->umodes & user_modes['p']))
|
||||||
update_session_deadline(client_p, NULL);
|
update_session_deadline(client_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
expire_override_deadlines_ev = rb_event_add("expire_override_deadlines", expire_override_deadlines, NULL, 60);
|
expire_override_deadlines_ev = rb_event_add("expire_override_deadlines", expire_override_deadlines, NULL, 60);
|
||||||
|
|
Loading…
Reference in a new issue