summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-18 12:41:37 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-18 12:54:51 +0100
commitee7ac5aaede95eb82ecc948d0e52ad01ddeaa6c9 (patch)
tree434d2420c366a90baeb9e7d315ca3ea16d249d35 /include
parent3b927b48ccb30619d9ace318b5a7d21f2279abbf (diff)
Clean up OnCleanup.
- Switch to using ExtensionItem::ExtensibleType for the type instead of TargetTypeFlags. - Pass the extensible to OnCleanup as an Extensible pointer instead of a void pointer. - Call OnCleanup for memberships as well as channels and users. - Rewrite event documentation to remove outdated references.
Diffstat (limited to 'include')
-rw-r--r--include/modules.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/modules.h b/include/modules.h
index 3ad0258b8..2481f8207 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -649,16 +649,15 @@ class CoreExport Module : public classbase, public usecountbase
*/
virtual void OnExpireLine(XLine *line);
- /** Called before your module is unloaded to clean up Extensibles.
- * This method is called once for every user and channel on the network,
- * so that when your module unloads it may clear up any remaining data
- * in the form of Extensibles added using Extensible::Extend().
- * If the target_type variable is TYPE_USER, then void* item refers to
- * a User*, otherwise it refers to a Channel*.
- * @param target_type The type of item being cleaned
- * @param item A pointer to the item's class
- */
- virtual void OnCleanup(int target_type, void* item);
+ /** Called before the module is unloaded to clean up extensibles.
+ * This method is called once for every channel, membership, and user.
+ * so that you can clear up any data relating to the specified extensible.
+ * @param type The type of extensible being cleaned up. If this is EXT_CHANNEL
+ * then item is a Channel*, EXT_MEMBERSHIP then item is a Membership*,
+ * and EXT_USER then item is a User*.
+ * @param item A pointer to the extensible which is being cleaned up.
+ */
+ virtual void OnCleanup(ExtensionItem::ExtensibleType type, Extensible* item);
/** Called after any nickchange, local or remote. This can be used to track users after nickchanges
* have been applied. Please note that although you can see remote nickchanges through this function, you should