1
0
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:
Bram Matthys
2015-07-09 14:04:32 +02:00
parent 19b06df164
commit 4c3fe8cfc8
2 changed files with 15 additions and 4 deletions
+14 -3
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}