1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 01:23:12 +02:00

Use remove_oper_privileges()

This commit is contained in:
Bram Matthys
2015-07-09 19:08:36 +02:00
parent f3199ec5e5
commit 787cd7c221
3 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -1859,7 +1859,7 @@ DLLFUNC CMD_FUNC(_m_umode)
if ((setflags & UMODE_OPER) && !IsOper(sptr) && MyConnect(sptr))
{
list_del(&sptr->special_node);
remove_oper_snomasks(sptr);
remove_oper_privileges(sptr, 0);
RunHook2(HOOKTYPE_LOCAL_OPER, sptr, 0);
}
+1 -2
View File
@@ -459,8 +459,7 @@ int what, setflags;
/* User is no longer oper (after the goto below, anyway)...
* so remove all oper-only modes and snomasks.
*/
remove_oper_modes(acptr);
remove_oper_snomasks(acptr);
remove_oper_privileges(acptr, 0);
}
goto setmodex;
case 'H':
+1 -5
View File
@@ -76,7 +76,6 @@ MOD_UNLOAD(m_svsnoop)
int m_svsnoop(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
aClient *acptr;
long oldumodes;
if (!(IsULine(sptr) && parc > 2))
return 0;
@@ -100,10 +99,7 @@ long oldumodes;
if (!list_empty(&acptr->special_node))
list_del(&acptr->special_node);
oldumodes = acptr->umodes;
remove_oper_modes(acptr);
remove_oper_snomasks(acptr);
send_umode_out(acptr, acptr, oldumodes);
remove_oper_privileges(acptr, 1);
RunHook2(HOOKTYPE_LOCAL_OPER, acptr, 0);
}
}