mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Allow toggling a capability from a Cap::Reference.
This commit is contained in:
parent
5bc4720d55
commit
fcc7b7cdb4
@ -319,6 +319,17 @@ namespace Cap
|
||||
return ref->IsEnabled(user);
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Turn the capability on/off for a user. If the cap is not registered this method has no effect.
|
||||
* @param user User to turn the cap on/off for
|
||||
* @param val True to turn the cap on, false to turn it off
|
||||
*/
|
||||
void Set(User* user, bool val)
|
||||
{
|
||||
if (ref)
|
||||
ref->Set(user, val);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class MessageBase : public ClientProtocol::Message
|
||||
|
Loading…
x
Reference in New Issue
Block a user