From 1442193c79016ea60a8a6e7df66f758040b77c76 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 20 Jun 2014 16:20:19 +0200 Subject: Change the type of the user parameter in the OnUserPreNick() hook from User to LocalUser No remote users were passed to this hook before. Remove needless IS_LOCAL() checks. --- include/modules.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index a9db6919c..0f8c25691 100644 --- a/include/modules.h +++ b/include/modules.h @@ -558,17 +558,14 @@ class CoreExport Module : public classbase, public usecountbase */ 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 - * NOT make any changes to the User if the user is a remote user as this may cause a desnyc. - * check user->server before taking any action (including returning nonzero from the method). + /** Called before local nickname changes. This can be used to implement Q-lines etc. * If your method returns nonzero, the nickchange is silently forbidden, and it is down to your * module to generate some meaninful output. * @param user The username changing their nick * @param newnick Their new nickname * @return 1 to deny the change, 0 to allow */ - virtual ModResult OnUserPreNick(User* user, const std::string &newnick); + virtual ModResult OnUserPreNick(LocalUser* user, const std::string& newnick); /** Called after any PRIVMSG sent from a user. * The dest variable contains a User* if target_type is TYPE_USER and a Channel* -- cgit v1.2.3