From bec20ca4531c5a6634a8deb991396ecd22aeb644 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 2 Sep 2009 01:06:02 +0000 Subject: Add more comments here git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11659 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/ctables.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/ctables.h b/include/ctables.h index 315b38f43..95db50b1a 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -37,6 +37,11 @@ enum TranslateType TR_CUSTOM /* Custom translation handled by EncodeParameter/DecodeParameter */ }; +/** Routing types for a command. Any command which is created defaults + * to having its command broadcasted on success. This behaviour may be + * overridden to one of the route types shown below (see the #defines + * below for more information on each one's behaviour) + */ enum RouteType { ROUTE_TYPE_LOCALONLY, @@ -46,13 +51,21 @@ enum RouteType ROUTE_TYPE_OPT_UCAST }; +/** Defines routing information for a command, containing a destination + * server id (if applicable) and a routing type from the enum above. + */ struct RouteDescriptor { + /** Routing type from the enum above + */ const RouteType type; /** For unicast, the destination server's name */ const std::string serverdest; - RouteDescriptor(RouteType t, const std::string d) + + /** Create a RouteDescriptor + */ + RouteDescriptor(RouteType t, const std::string &d) : type(t), serverdest(d) { } }; @@ -62,9 +75,9 @@ 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 to all servers, ignore if not understood */ +/** 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, ignore if not understood */ +/** Route this command to a single server wrapped via ENCAP, so ignored if not understood */ #define ROUTE_OPT_UCAST(x) (RouteDescriptor(ROUTE_TYPE_OPT_UCAST, x)) /** A structure that defines a command. Every command available -- cgit v1.2.3