diff options
| author | Sadie Powell <sadie@witchery.services> | 2024-03-14 21:18:08 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2024-03-14 21:35:17 +0000 |
| commit | beaf09de7bcb0042dfd8f388064126e511a5b28d (patch) | |
| tree | ba14e1ff1ff96b5623c459b2de35d766d086e427 /modules/operserv/os_defcon.cpp | |
| parent | c8d8978cd0bfb10613da331c5b13bbcf8486f85f (diff) | |
Rework sending global notices.
Admins can now queue multiple messages and send them when they are
ready. This is fully compatible with the previous global behaviour.
Admins can now also send messages to individual servers. This is
useful for informing users of maintenance due to downtime.
Diffstat (limited to 'modules/operserv/os_defcon.cpp')
| -rw-r--r-- | modules/operserv/os_defcon.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/operserv/os_defcon.cpp b/modules/operserv/os_defcon.cpp index 564cfec50..b098a4775 100644 --- a/modules/operserv/os_defcon.cpp +++ b/modules/operserv/os_defcon.cpp @@ -134,12 +134,12 @@ public: if (DConfig.globalondefcon) { if (!DConfig.offmessage.empty()) - GlobalService->SendGlobal(NULL, "", DConfig.offmessage); + GlobalService->SendSingle(DConfig.offmessage); else - GlobalService->SendGlobal(NULL, "", Anope::printf(Language::Translate(_("The Defcon level is now at: \002%d\002")), DConfig.defaultlevel)); + GlobalService->SendSingle(Anope::printf(Language::Translate(_("The Defcon level is now at: \002%d\002")), DConfig.defaultlevel)); if (!DConfig.message.empty()) - GlobalService->SendGlobal(NULL, "", DConfig.message); + GlobalService->SendSingle(DConfig.message); } runDefCon(); @@ -217,12 +217,12 @@ public: if (DConfig.globalondefcon) { if (DConfig.defaultlevel == 5 && !DConfig.offmessage.empty()) - GlobalService->SendGlobal(NULL, "", DConfig.offmessage); + GlobalService->SendSingle(DConfig.offmessage); else if (DConfig.defaultlevel != 5) { - GlobalService->SendGlobal(NULL, "", Anope::printf(_("The Defcon level is now at: \002%d\002"), DConfig.defaultlevel)); + GlobalService->SendSingle(Anope::printf(_("The Defcon level is now at: \002%d\002"), DConfig.defaultlevel)); if (!DConfig.message.empty()) - GlobalService->SendGlobal(NULL, "", DConfig.message); + GlobalService->SendSingle(DConfig.message); } } |
