summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-01 21:41:52 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-01 21:41:52 +0000
commit75d9c67804196c2e4059f3ff89f2ed5ee79a175f (patch)
treee5275c998f06bbe13e198c7a42b2cfc917be5e4f /include
parent6e6846b68a28d858275702e6662e79328e62c60e (diff)
Add ROUTE_TYPE_MESSAGE and use for PRIVMSG/NOTICE routing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11791 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/ctables.h3
-rw-r--r--include/inspircd.h2
-rw-r--r--include/modules.h3
3 files changed, 6 insertions, 2 deletions
diff --git a/include/ctables.h b/include/ctables.h
index a2f4e9bb3..dd83a05a3 100644
--- a/include/ctables.h
+++ b/include/ctables.h
@@ -46,6 +46,7 @@ enum RouteType
ROUTE_TYPE_LOCALONLY,
ROUTE_TYPE_BROADCAST,
ROUTE_TYPE_UNICAST,
+ ROUTE_TYPE_MESSAGE,
ROUTE_TYPE_OPT_BCAST,
ROUTE_TYPE_OPT_UCAST
};
@@ -74,6 +75,8 @@ struct RouteDescriptor
#define ROUTE_BROADCAST (RouteDescriptor(ROUTE_TYPE_BROADCAST, ""))
/** Route this command to a single server (do nothing if own server name specified) */
#define ROUTE_UNICAST(x) (RouteDescriptor(ROUTE_TYPE_UNICAST, x))
+/** Route this command as a message with the given target (any of user, #channel, @#channel, $servermask) */
+#define ROUTE_MESSAGE(x) (RouteDescriptor(ROUTE_TYPE_MESSAGE, x))
/** Route this command to all servers wrapped via ENCAP, so ignored if not understood */
#define ROUTE_OPT_BCAST (RouteDescriptor(ROUTE_TYPE_OPT_BCAST, ""))
/** Route this command to a single server wrapped via ENCAP, so ignored if not understood */
diff --git a/include/inspircd.h b/include/inspircd.h
index a5e40102a..b80bba7ab 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -933,7 +933,7 @@ class CommandModule : public Module
Version GetVersion()
{
- return Version(cmd.command, VF_VENDOR);
+ return Version(cmd.command, VF_VENDOR|VF_CORE);
}
};
diff --git a/include/modules.h b/include/modules.h
index ff52cd600..edfe31007 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -35,7 +35,8 @@ enum ModuleFlags {
VF_VENDOR = 2, // module is a vendor module (came in the original tarball, not 3rd party)
VF_SERVICEPROVIDER = 4, // module provides a service to other modules (can be a dependency)
VF_COMMON = 8, // module needs to be common on all servers in a network to link
- VF_OPTCOMMON = 16 // module should be common on all servers for unsurprising behavior
+ VF_OPTCOMMON = 16, // module should be common on all servers for unsurprising behavior
+ VF_CORE = 32 // module is a core command, can be assumed loaded on all servers
};
/** Used with SendToMode()