Fixed some basic stuff

This commit is contained in:
WolverinDEV 2020-07-23 20:28:41 +02:00
parent 7a3854843f
commit a4d7c90945

View File

@ -81,7 +81,7 @@ namespace ts {
ts_always_inline
static bool permission_granted(const permission::v2::PermissionFlaggedValue& channel_permission_value, const permission::v2::PermissionFlaggedValue& granted_value, bool require_granted_value) {
if(!channel_permission_value.has_value || channel_permission_value.value == 0) {
return !require_granted_value || granted_value.has_power();
return granted_value.has_value ? granted_value.has_power() : !require_granted_value;
}
if(channel_permission_value.value == -1) {
return granted_value.value == -1;