aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-03-08 19:37:12 +0000
committerGravatar Sadie Powell2024-03-08 19:37:12 +0000
commit91bcc80d29dac1f49fcb0f208c78852b4d810504 (patch)
treeaaa8ed29b8b7d1f53fa1a7a1224f961eeb118fa7 /include
parentDon't try to serialize extension items when they're being unset. (diff)
Rename OnBroadcastMessage to OnRouteMessage.
This is more descriptive of what it actually does.
Diffstat (limited to 'include')
-rw-r--r--include/modules/server.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/include/modules/server.h b/include/modules/server.h
index 138d36cd1..128dc08be 100644
--- a/include/modules/server.h
+++ b/include/modules/server.h
@@ -24,9 +24,9 @@
namespace ServerProtocol
{
- class BroadcastEventListener;
class LinkEventListener;
class MessageEventListener;
+ class RouteEventListener;
class SyncEventListener;
}
@@ -40,24 +40,6 @@ enum
RPL_MAPUSERS = 18,
};
-class ServerProtocol::BroadcastEventListener
- : public Events::ModuleEventListener
-{
-public:
- BroadcastEventListener(Module* mod, unsigned int eventprio = DefaultPriority)
- : ModuleEventListener(mod, "event/server-broadcast", eventprio)
- {
- }
-
- /** Fired when a channel message is being broadcast across the network.
- * @param channel The channel which is having a message sent to it.
- * @param server The server which might have a message broadcast to it.
- * @return Either MOD_RES_ALLOW to always send the message to the server, MOD_RES_DENY to never
- * send the message to the server or MOD_RES_PASSTHRU if no module handled the event.
- */
- virtual ModResult OnBroadcastMessage(const Channel* channel, const Server* server) { return MOD_RES_PASSTHRU; }
-};
-
class ServerProtocol::LinkEventListener
: public Events::ModuleEventListener
{
@@ -108,6 +90,25 @@ public:
virtual void OnBuildServerMessage(const Server* source, const char* name, ClientProtocol::TagMap& tags) { }
};
+class ServerProtocol::RouteEventListener
+ : public Events::ModuleEventListener
+{
+public:
+ RouteEventListener(Module* mod, unsigned int eventprio = DefaultPriority)
+ : ModuleEventListener(mod, "event/server-route", eventprio)
+ {
+ }
+
+ /** Fired when a channel message is being routed across the network.
+ * @param channel The channel which is having a message sent to it.
+ * @param server The server which might have a message routed to it.
+ * @return Either MOD_RES_ALLOW to always send the message to the server, MOD_RES_DENY to never
+ * send the message to the server, or MOD_RES_PASSTHRU to not handle the event.
+ */
+ virtual ModResult OnRouteMessage(const Channel* channel, const Server* server) { return MOD_RES_PASSTHRU; }
+};
+
+
class ServerProtocol::SyncEventListener
: public Events::ModuleEventListener
{