mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 16:34:13 +01:00
override: Remove umode +p when deopering.
This commit is contained in:
parent
0137d36122
commit
e5c254d7d1
1 changed files with 10 additions and 7 deletions
|
@ -107,19 +107,22 @@ check_umode_change(void *vdata)
|
|||
if (!MyClient(source_p))
|
||||
return;
|
||||
|
||||
if (data->oldumodes & UMODE_OPER && !IsOper(source_p))
|
||||
source_p->umodes &= ~user_modes['p'];
|
||||
|
||||
/* didn't change +p umode, we don't need to do anything */
|
||||
if (!((data->oldumodes ^ source_p->umodes) & user_modes['p']))
|
||||
return;
|
||||
|
||||
if (!IsOperOverride(source_p))
|
||||
{
|
||||
sendto_one_notice(source_p, ":*** You need oper:override privilege for +p");
|
||||
source_p->umodes &= ~user_modes['p'];
|
||||
return;
|
||||
}
|
||||
|
||||
if (source_p->umodes & user_modes['p'])
|
||||
{
|
||||
if (!IsOperOverride(source_p))
|
||||
{
|
||||
sendto_one_notice(source_p, ":*** You need oper:override privilege for +p");
|
||||
source_p->umodes &= ~user_modes['p'];
|
||||
return;
|
||||
}
|
||||
|
||||
update_session_deadline(source_p, NULL);
|
||||
|
||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s has enabled oper-override (+p)",
|
||||
|
|
Loading…
Reference in a new issue