- // we couldn't claim mode x... possibly anther module has it,
- // this might become likely to happen if there are a lot of 3rd
- // party modules around in the future -- any 3rd party modules
- // SHOULD implement a system of configurable mode letters (e.g.
- // from a config file)
- Srv->Log(DEFAULT,"*** m_cloaking: ERROR, failed to allocate user mode +x!");
- printf("Could not claim usermode +x for this module!");
- return;
- }
- }
-
- virtual ~ModuleCloaking()
- {
- }
-
- virtual Version GetVersion()
- {
- // returns the version number of the module to be
- // listed in /MODULES
- return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
- }
-
- virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)
- {
- // this method is called for any extended mode character.
- // all module modes for all modules pass through here
- // (unless another module further up the chain claims them)
- // so we must be VERY careful to only act upon modes which
- // we have claimed ourselves. This is a feature to allow
- // modules to 'spy' on extended mode activity if they so wish.
- if ((modechar == 'x') && (type == MT_CLIENT))
- {
- // OnExtendedMode gives us a void* as the target, we must cast
- // it into a userrec* or a chanrec* depending on the value of
- // the 'type' parameter (MT_CLIENT or MT_CHANNEL)
- userrec* dest = (userrec*)target;
-
- // we've now determined that this is our mode character...
- // is the user adding the mode to their list or removing it?
- if (mode_on)