summaryrefslogtreecommitdiff
path: root/include/ctables.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ctables.h')
-rw-r--r--include/ctables.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/ctables.h b/include/ctables.h
index ad2135b1e..f744d6340 100644
--- a/include/ctables.h
+++ b/include/ctables.h
@@ -29,7 +29,8 @@ enum TranslateType
TR_TEXT, /* Raw text, leave as-is */
TR_NICK, /* Nickname, translate to UUID for server->server */
TR_NICKLIST, /* Comma seperated nickname list, translate to UUIDs */
- TR_SPACENICKLIST /* Space seperated nickname list, translate to UUIDs */
+ TR_SPACENICKLIST, /* Space seperated nickname list, translate to UUIDs */
+ TR_CUSTOM, /* Custom translation handled by EncodeParameter/DecodeParameter */
};
/** For commands which should not be replicated to other
@@ -139,6 +140,25 @@ class CoreExport Command : public Extensible
return CMD_INVALID;
}
+ /** Encode a parameter for server->server transmission.
+ * Used for parameters for which the translation type is TR_CUSTOM.
+ * @param parameter The parameter to encode. Can be modified in place.
+ * @param index The parameter index (0 == first parameter).
+ */
+ virtual void EncodeParameter(std::string& parameter, int index)
+ {
+ }
+
+ /** Decode a parameter from server->server transmission.
+ * Not currently used in this version of InspIRCd.
+ * Used for parameters for which the translation type is TR_CUSTOM.
+ * @param parameter The parameter to decode. Can be modified in place.
+ * @param index The parameter index (0 == first parameter).
+ */
+ virtual void DecodeParameter(std::string& parameter, int index)
+ {
+ }
+
/** Disable or enable this command.
* @param setting True to disable the command.
*/