From b5e220008782b2d538cb8e6e3b1923af0c13fb99 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:44:59 +0000 Subject: Allow commands to optionally route themselves using ENCAP git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11602 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/ctables.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/ctables.h') diff --git a/include/ctables.h b/include/ctables.h index b07d3f4e0..a543b7e37 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -41,7 +41,9 @@ enum RouteType { ROUTE_TYPE_LOCALONLY, ROUTE_TYPE_BROADCAST, - ROUTE_TYPE_UNICAST + ROUTE_TYPE_UNICAST, + ROUTE_TYPE_OPT_BCAST, + ROUTE_TYPE_OPT_UCAST }; struct RouteDescriptor @@ -54,9 +56,16 @@ struct RouteDescriptor : type(t), serverdest(d) { } }; +/** Do not route this command */ #define ROUTE_LOCALONLY (RouteDescriptor(ROUTE_TYPE_LOCALONLY, "")) +/** Route this command to all servers, fail if not understood */ #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 to all servers, ignore if not understood */ +#define ROUTE_OPT_BCAST (RouteDescriptor(ROUTE_TYPE_OPT_BCAST, "")) +/** Route this command to a single server, ignore if not understood */ +#define ROUTE_OPT_UCAST(x) (RouteDescriptor(ROUTE_TYPE_OPT_UCAST, x)) /** A structure that defines a command. Every command available * in InspIRCd must be defined as derived from Command. -- cgit v1.2.3