diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-09-01 14:17:04 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-09-11 12:10:07 +0200 |
commit | 537ad4740afdbc656326cce766d1818cf5811c37 (patch) | |
tree | 7893f5921990384ddafcc97cb097c394dbc115e1 /include | |
parent | 9d75ba35743eb8f44a2d7beb8e08aa43c13f5d2e (diff) |
Add a type id field to ModeHandler
Diffstat (limited to 'include')
-rw-r--r-- | include/mode.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/mode.h b/include/mode.h index 9b8d07877..18fed8b0a 100644 --- a/include/mode.h +++ b/include/mode.h @@ -100,6 +100,12 @@ enum ParamSpec */ class CoreExport ModeHandler : public ServiceProvider { + public: + enum Class + { + MC_OTHER + }; + /** * Removes this prefix mode from all users on the given channel * @param channel The channel which the server wants to remove your mode from @@ -150,6 +156,10 @@ class CoreExport ModeHandler : public ServiceProvider */ ModeType m_type; + /** The object type of this mode handler + */ + const Class type_id; + /** The prefix char needed on channel to use this mode, * only checked for channel modes */ @@ -170,8 +180,9 @@ class CoreExport ModeHandler : public ServiceProvider * @param modeletter The mode letter you wish to handle * @param params Parameters taken by the mode * @param type Type of the mode (MODETYPE_USER or MODETYPE_CHANNEL) + * @param mclass The object type of this mode handler, one of ModeHandler::Class */ - ModeHandler(Module* me, const std::string& name, char modeletter, ParamSpec params, ModeType type); + ModeHandler(Module* me, const std::string& name, char modeletter, ParamSpec params, ModeType type, Class mclass = MC_OTHER); virtual CullResult cull(); virtual ~ModeHandler(); /** |