summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-06 22:28:57 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-06 22:28:57 +0000
commit526f5a4a02882b19056fe755dff1f64b764ff313 (patch)
tree6a9e92e4f3f7088b18dcdde360d07c911ee174df /include/modules.h
parenteacd707421be4f2612df9bde4517649061bb062e (diff)
Construct explicit parameter type list for MODE parameters
Previously, we used TR_SPACENICKLIST on the parameters. This worked only because usually, if anything in the list parsed as a nick, then it was a nick. However, some modes like +k and +g allow free-form text, which could also resolve as a nick. Add extra parameters to allow modes to specify their TranslateType, defaulting to TR_TEXT. This fixes bug #757, found by Taros git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11180 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index 536313d8f..90aeb178e 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -739,8 +739,9 @@ class CoreExport Module : public Extensible
* @param dest The target of the modes (User* or Channel*)
* @param target_type The type of target (TYPE_USER or TYPE_CHANNEL)
* @param text The actual modes and their parameters if any
+ * @param translate The translation types of the mode parameters
*/
- virtual void OnMode(User* user, void* dest, int target_type, const std::string &text);
+ virtual void OnMode(User* user, void* dest, int target_type, const std::string &text, const std::vector<TranslateType> &translate);
/** Allows modules to alter or create server descriptions
* Whenever a module requires a server description, for example for display in
@@ -847,8 +848,9 @@ class CoreExport Module : public Extensible
* @param target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
* @param target The Channel* or User* that modes should be sent for
* @param modeline The modes and parameters to be sent
+ * @param translate The translation types of the mode parameters
*/
- virtual void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::string &modeline);
+ virtual void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::string &modeline, const std::vector<TranslateType> &translate);
/** Implemented by modules which provide the ability to link servers.
* These modules will implement this method, which allows metadata (extra data added to