summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-20 16:20:19 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-20 16:20:19 +0200
commit1442193c79016ea60a8a6e7df66f758040b77c76 (patch)
treefdbfac6cbfa63f1f4e2286a97fa386812b1aee92 /include
parent3323226c38c959392e61f406ec62f9d5f24fce15 (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/modules.h7
1 files changed, 2 insertions, 5 deletions
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<User*, bool>& 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*