From ac72c53ce2425801e135ab57c5defa707adcef5d Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 13 Jun 2013 18:20:10 +0200 Subject: Replace void* dest and target_type parameters of OnMode with a User* and a Channel* --- include/modules.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'include/modules.h') diff --git a/include/modules.h b/include/modules.h index 0c521332a..a5f99ee86 100644 --- a/include/modules.h +++ b/include/modules.h @@ -667,16 +667,17 @@ class CoreExport Module : public classbase, public usecountbase virtual void OnText(User* user, void* dest, int target_type, const std::string &text, char status, CUList &exempt_list); /** Called after every MODE command sent from a user - * The dest variable contains a User* if target_type is TYPE_USER and a Channel* - * if target_type is TYPE_CHANNEL. The text variable contains the remainder of the - * mode string after the target, e.g. "+wsi" or "+ooo nick1 nick2 nick3". + * Either the usertarget or the chantarget variable contains the target of the modes, + * the actual target will have a non-NULL pointer. + * The modes vector contains the remainder of the mode string after the target, + * e.g.: "+wsi" or ["+ooo", "nick1", "nick2", "nick3"]. * @param user The user sending the MODEs - * @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 usertarget The target user of the modes, NULL if the target is a channel + * @param chantarget The target channel of the modes, NULL if the target is a user + * @param modes 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::vector &text, const std::vector &translate); + virtual void OnMode(User* user, User* usertarget, Channel* chantarget, const std::vector& modes, const std::vector& translate); /** Allows modules to alter or create server descriptions * Whenever a module requires a server description, for example for display in -- cgit v1.2.3