diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-30 18:40:51 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-30 18:40:51 +0000 |
commit | ab8305ad99d7bb7d2cfe4154b2deb007546d5b70 (patch) | |
tree | 69459f1050bcbb39111ec4afa5f269656c21cc95 /include/users.h | |
parent | 845135ba55d2bad81588a80546c8abe2b76ed47c (diff) |
Move nick change code out of cmd_nick; fixes double-invocation of hooks and may eliminate bug #911
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12330 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h index 51230431a..b71f32748 100644 --- a/include/users.h +++ b/include/users.h @@ -528,7 +528,7 @@ class CoreExport User : public Extensible * @param newnick The nickname to change to * @return True if the nickchange was successful. */ - bool ForceNickChange(const char* newnick); + inline bool ForceNickChange(const char* newnick) { return ChangeNick(newnick, true); } /** Oper down. * This will clear the +o usermode and unset the user's oper type @@ -670,6 +670,13 @@ class CoreExport User : public Extensible */ bool ChangeName(const char* gecos); + /** Change a user's nick + * @param newnick The new nick + * @param force True if the change is being forced (should not be blocked by modes like +N) + * @return True if the change succeeded + */ + bool ChangeNick(const std::string& newnick, bool force = false); + /** Send a command to all local users from this user * The command given must be able to send text with the * first parameter as a servermask (e.g. $*), so basically |