summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 01:06:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 01:06:02 +0000
commitbec20ca4531c5a6634a8deb991396ecd22aeb644 (patch)
tree3ea825b73c1d3e816623b4bad44da78c263512c0 /include
parent0377d937c5d1bf20fa0c29d4a41c7fd89502ab38 (diff)
Add more comments here
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11659 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/ctables.h19
1 files changed, 16 insertions, 3 deletions
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