diff options
author | Sadie Powell <sadie@witchery.services> | 2020-04-11 15:09:34 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-04-11 15:44:51 +0100 |
commit | 6fcbfc072387752ec345d7589e986b9959f350fc (patch) | |
tree | c62f9074e1d1409ac4379025d6938cbaf8c8e29f /include/users.h | |
parent | 41f781a9a6560eab393b18815dbdfa9073c6810b (diff) |
Add support for limiting what opers can subscribe to snomasks.
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/users.h b/include/users.h index bae2615c2..4d7994e8e 100644 --- a/include/users.h +++ b/include/users.h @@ -490,6 +490,12 @@ class CoreExport User : public Extensible */ virtual bool HasModePermission(const ModeHandler* mh) const; + /** Determines whether this user can set the specified snomask. + * @param chr The server notice mask character to look up. + * @return True if the user can set the specified snomask; otherwise, false. + */ + virtual bool HasSnomaskPermission(char chr) const; + /** Creates a usermask with real host. * Takes a buffer to use and fills the given buffer with the hostmask in the format user\@host * @return the usermask in the format user\@host @@ -879,6 +885,9 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local */ bool HasModePermission(const ModeHandler* mh) const CXX11_OVERRIDE; + /** @copydoc User::HasSnomaskPermission */ + bool HasSnomaskPermission(char chr) const CXX11_OVERRIDE; + /** Change nick to uuid, unset REG_NICK and send a nickname overruled numeric. * This is called when another user (either local or remote) needs the nick of this user and this user * isn't registered. |