mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 13:53:12 +02:00
make /GLOBOPS and /LOCOPS use sendto_umode(UMODE_OPER.. / sendto_umode_global(UMODE_OPER..
This commit is contained in:
+14
-3
@@ -88,13 +88,24 @@ DLLFUNC CMD_FUNC(m_globops)
|
||||
me.name, parv[0], "GLOBOPS");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MyClient(sptr) && !OperClass_evaluateACLPath("chat:globops",sptr,NULL,NULL,NULL))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
}
|
||||
sendto_server(IsServer(cptr) ? cptr : NULL, 0, 0, ":%s GLOBOPS :%s",
|
||||
parv[0], message);
|
||||
sendto_failops_whoare_opers("from %s: %s", parv[0], message);
|
||||
|
||||
if (MyClient(sptr))
|
||||
{
|
||||
/* Easy */
|
||||
sendto_umode_global(UMODE_OPER, "from %s: %s", parv[0], message);
|
||||
} else
|
||||
{
|
||||
/* Backward-compatible (3.2.x) */
|
||||
sendto_umode(UMODE_OPER, "from %s: %s", parv[0], message);
|
||||
sendto_server(cptr, 0, 0, ":%s SENDUMODE o :from %s: %s",
|
||||
sptr->name, message);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,6 @@ DLLFUNC CMD_FUNC(m_locops)
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
}
|
||||
sendto_locfailops("from %s: %s", parv[0], message);
|
||||
sendto_umode(UMODE_OPER, "from %s: %s", parv[0], message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user