X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmodules.h;h=9c0b22b6c075fd90a2cbdba4eaa11919ff64ac25;hb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;hp=7223f6b9d61d139cb87f0952b16cf2fd6f6a1f1f;hpb=99f79a4e5c3abbe91a03216824e7659051872054;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/modules.h b/include/modules.h index 7223f6b9d..9c0b22b6c 100644 --- a/include/modules.h +++ b/include/modules.h @@ -264,7 +264,7 @@ enum Implementation I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass, - I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, + I_OnText, I_OnPassCompare, I_OnNamesListItem, I_OnNumeric, I_OnPreRehash, I_OnModuleRehash, I_OnSendWhoLine, I_OnChangeIdent, I_OnSetUserIP, I_END }; @@ -556,7 +556,7 @@ class CoreExport Module : public classbase, public usecountbase * * Set exceptions[user] = true to include, exceptions[user] = false to exclude */ - virtual void OnBuildNeighborList(User* source, UserChanList &include_c, std::map &exceptions); + virtual void OnBuildNeighborList(User* source, IncludeChanList& include_c, std::map& exceptions); /** Called before any nickchange, local or remote. This can be used to implement Q-lines etc. * Please note that although you can see remote nickchanges through this function, you should @@ -853,15 +853,14 @@ class CoreExport Module : public classbase, public usecountbase * Return 1 from this function to block the mode character from being processed entirely. * @param user The user who is sending the mode * @param chan The channel the mode is being sent to (or NULL if a usermode) - * @param mode The mode character being set + * @param mh The mode handler for the mode being changed * @param param The parameter for the mode or an empty string * @param adding true of the mode is being added, false if it is being removed - * @param pcnt The parameter count for the mode (0 or 1) * @return ACR_DENY to deny the mode, ACR_DEFAULT to do standard mode checking, and ACR_ALLOW * to skip all permission checking. Please note that for remote mode changes, your return value * will be ignored! */ - virtual ModResult OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt); + virtual ModResult OnRawMode(User* user, Channel* chan, ModeHandler* mh, const std::string& param, bool adding); /** Called whenever a user joins a channel, to determine if key checks should go ahead or not. * This method will always be called for each join, wether or not the channel is actually +k, and @@ -1034,10 +1033,12 @@ class CoreExport Module : public classbase, public usecountbase */ virtual ModResult OnSetConnectClass(LocalUser* user, ConnectClass* myclass); +#ifdef INSPIRCD_ENABLE_TESTSUITE /** Add test suite hooks here. These are used for testing functionality of a module * via the --testsuite debugging parameter. */ virtual void OnRunTestSuite(); +#endif /** Called for every item in a NAMES list, so that modules may reformat portions of it as they see fit. * For example NAMESX, channel mode +u and +I, and UHNAMES. If the nick is set to an empty string by any @@ -1051,9 +1052,10 @@ class CoreExport Module : public classbase, public usecountbase * @param source The user running the /WHO query * @param params The parameters to the /WHO query * @param user The user that this line of the query is about + * @param memb The member shown in this line, NULL if no channel is in this line * @param line The raw line to send; modifiable, if empty no line will be returned. */ - virtual void OnSendWhoLine(User* source, const std::vector& params, User* user, std::string& line); + virtual void OnSendWhoLine(User* source, const std::vector& params, User* user, Membership* memb, std::string& line); /** Called whenever a local user's IP is set for the first time, or when a local user's IP changes due to * a module like m_cgiirc changing it.