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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user