mirror of
https://github.com/matrix-construct/construct
synced 2024-11-27 09:12:36 +01:00
61b517ca3c
* To benefit from the precompiled-header (PCH) it MUST provide "the first C token." Advantages: Never worry about the include stack again. Remember, this means one less thing for random module developers, community people learning C++, and new developers to deal with. It should reduce the learning curve and barrier for participation. Disadvantages: Makes overall compilation a bit slower, especially without any additional work to improve it again. There are several opportunities, places where the PCH is probably being ignored, etc that can be addressed.
32 lines
829 B
C++
32 lines
829 B
C++
/*
|
|
* Remote oper up notices.
|
|
*/
|
|
|
|
using namespace ircd;
|
|
|
|
static const char sno_desc[] =
|
|
"Adds server notices for remote oper up";
|
|
|
|
static void h_sgo_umode_changed(void *);
|
|
|
|
mapi_hfn_list_av1 sgo_hfnlist[] = {
|
|
{ "umode_changed", (hookfn) h_sgo_umode_changed },
|
|
{ NULL, NULL }
|
|
};
|
|
|
|
DECLARE_MODULE_AV2(sno_globaloper, NULL, NULL, NULL, NULL, sgo_hfnlist, NULL, NULL, sno_desc);
|
|
|
|
static void
|
|
h_sgo_umode_changed(void *vdata)
|
|
{
|
|
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
|
|
struct Client *source_p = data->client;
|
|
|
|
if (MyConnect(source_p) || !HasSentEob(source_p->servptr))
|
|
return;
|
|
|
|
if (!(data->oldumodes & UMODE_OPER) && IsOper(source_p))
|
|
sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr,
|
|
"%s (%s@%s) is now an operator",
|
|
source_p->name, source_p->username, source_p->host);
|
|
}
|