shobhit-pathak / MatchZy

MatchZy is a plugin for CS2 (Counter Strike 2) for running and managing practice/pugs/scrims/matches with easy configuration and Get5 (G5API/G5V) support as well!
https://shobhit-pathak.github.io/MatchZy/
MIT License
221 stars 55 forks source link

matchzy ignores admin_overrides.json #108

Open Dying-Ducks opened 3 months ago

Dying-Ducks commented 3 months ago

A lot of people (me included) had the demand to be able to make a command available for everyone.

After I requested this in the counterstrikesharp discord they implemented a way to do so: you can now remove all flag requirements for a command in the admin_overrides.json.

This was tested and works flawlessly with other css plugins.

Now the issue is: it doesn’t work with matchzy. I suspect its due to matchzy own "admin system", as I get the "you don’t have the permission" error message not from css itself (as it does with other plugins if you don’t have the permission) but we get the matchzy error message.

Somehow matchzy just checks for permission in it "own admins" (that we set in the cfg>matchzy) and the admins specified in the css config folder but ignores the admin_overrides.json in css.

A hotfix could be a command to disable matchzys own admin system and let css do its thing, as this works on other plugins.

shobhit-pathak commented 3 months ago

Hey!

The first priority is given to CSS's admin system only, then later on MatchZy's admin.json is checked. The difference in "you don’t have the permission" message is because how we check the admin permissions (In IsPlayerAdmin function). I think while checking the permissions, admin_overrides.json is not considered. I'll check what changes I'll have to do to make it compatible.

Thanks for letting me know about it!