Electric Heaters require no power despite permissionsNo Thanks
Settings:
oxide/config/LightsOn.json: "Heaters (true/false)": true,
Permissions: lightson > freelights > Revoked
 
Hello, I wanted to bring this to your attention as well. Electric heaters will turn on automatically for all players who place them, regardless of their "freelights" permission being set to Revoked. Anyone who places down an electric heater will not require a power source if the configuration setting is set to true ("Heaters (true/false)": true).
 
The only players that should not require a power source should directly have the "freelights" permission, but it seems this is not working correctly. The only way to prevent this permission bypass exploit is to set the config option to false entirely and disabling it. Small issue, but I thought you would like to know about it all the same. Sorry for creating more than one thread this week. I use this plugin a lot though so I am becoming quite familiar with it.
 
Sincerely,
Psyche
That permission is just for togglable lights. the documentation states:
lightson.allowed
Granting that to a group or player allows them to toggle the lights using the /lights command. Note this is really an admin command.

lightson.freelights
Grant this to a player allows them to toggle their lights (and only lights that are switchable) on/off with no fuel needed.

This plugin is not intended to support VIP servers, I would suggest you use NightLantern if you want that feature. I'm tempted to remove the second permission entirely.

Removing that permission does not fix the issue with the heaters.

Sorry for any misunderstanding and thank you for your response here as well. I see you have already pushed out an update to remove the freelights permission as you intended, but I was not attempting to set up special permissions for any VIP members on my servers or requesting support for VIP permissions at all. I didn't neccessarily want anyone on my servers using this plugin except for me for balance reasons (I think it would be too easy in general), which is how I noticed the issue in the first place. I had installed this on one of my servers for my own personal use only.

While testing it out for myself I discovered some players were "complaining" that they could simply place down an electric heater and didn't have to use any electricity. The plugin does not seem to function as described with the heater entities. Even players that were not granted any permissions at all can still use heaters without any power source, although I did not notice any further issues with other entities on the server, just the heaters alone.

When the configuration file is set to "Heaters (true/false)": true (default), then all players on the server can place and use an electric heater without a power source connected even without any permissions from the plugin. The freelights permission has now been removed in version 1.6.11 as you are well aware, but that issue still persists.

I have deleted my config file and generated a brand new one using the latest version. When I disable the plugin entirely (oxide.unload LightsOn) or set ("Heaters (true/false)": false) in the config, the problem subsides immediately. This leads me to believe that this issue is not tied to the freelights permission itself but some other function within this plugin.

EDIT: Unsure why this thread was marked as "No Thanks", because this is a real glitch that alters the way heaters work by default for every connected player. I'm quite certain that heaters should always require a power source for an average player with no special permissions. It should probably be fixed. In the meantime I will simply set heaters to false in my config file.

I was not wanting to support vip functionality. I checked the code it does check for the heater being set: if (config.Heaters) for activation. was your config current? I gave this a second test on my test instance and they worked as expected with the flag. it does not automatically turn off ones previously turned on. I did notice it did not turn them off when lights off heater was used, I will look into that.
Yes, the configuration was current. I made no changes to it after downloading the new version. I tested using the default configuration for v1.6.11. I made sure to not get it confused by deleting my configuration file entirely and then allowed the new version to generate totally fresh files. As long as the config file states Heaters (true/false)": true, which it does by default, then any heater placed after reloading the plugin will clearly result in a powered on heater - and it will not require any power source to be connected to it. The user does not need to be granted any permissions from the plugin for this to happen. It will happen to all players who try to place a heater.
did a lot of testing. with the flag set to true do /lights off heater (that will turn them off). Then change the config to false for heaters. reload the plugin. that seems to resolve it on my test server.

This is not "Solved" or fixed, yet. I've tried to break this down as detailed as I possibly could, but I feel like there is still a misunderstanding somewhere here. I already mentioned the Heaters (true/false)": true configuration setting, which is where all of these issues stem from. Turning that off is the only solution so far that I can see.

I downloaded the latest version (v1.6.12) and deleted the 'oxide/config/LightsOn.json' config file once again. I let it generate an absolutely fresh file using the current default settings. Heaters are still set to true by default in the plugin configuration - and they still require no power when placed. Setting the option to false in the configuration will "fix" it, in a way, but this is just disabling support for heaters entirely and then the /lights command will no longer toggle them at all.

Setting it to false will restore the normal requirement of power but it's essentially just a bandaid fix and will require everyone who downloads this plugin to manually go in and change that setting. Not everyone will even know they should do that unless they happen to check out this thread. If the plugin is breaking heaters by default (which it does) then this option should either be patched to fix the issue or removed temporarily so that users who install this plugin don't break their heaters. Sorry for any inconvenience on your end but surely the feedback will help sort it out. I wish you luck. Cheers brother.

-Psyche

Understand the plugin alters the in game entity permanently. Unloading the plugin, resetting the config does not alter that. Only enabling it in the plugin to change the state will alter the in game settings for the entity. Then disable it and reload the plugin if you no longer want it. This avoids needing to continuously alter the entities behaviour (which generates a lot of server load). Changes in state of an entity is not done on unload as it would add a massive spike on unload. We do support day/night but I generally suggest always on to minimize server load. We do a quick scan on startup to start entities to allow for night/day, but only to turn things on. The design is about minimizing server load for pve servers with literally thousands of lights and devices. It is not designed to be as dynamic as you are expecting.
I'm fairly certain that I am not confused as to how to reload a simple plugin. I am well aware of how server entities work and when the effects of this plugin are applied to them, as that is quite a basic thing to understand. Thanks for that. However that's not the problem. It's quite simple really. As long as the configuration option is set to true, then when a heater is placed it will power on immediately. Set heaters to false, then this does not happen. Do as you will here, I was just informing you of the issue. All of that said, it doesn't change the fact that this plugin still breaks the heaters with the default configuration and anyone who currently installs this will have to manually go in and adjust their settings to false, otherwise they will find all their players using electric heaters that don't require a power source. I suppose if "not as dynamic as I am expecting" includes that obvious side-effect, then sure, leave it as it currently is. I have already found an alternative solution by using a different plugin. Like I said - good luck here. Have a good night.
That is intentional. Placed items turn on. From the notes section: "Heaters, Fluid Switches, Water Pumps, Electric Water Purifiers, CCTV, and Igniters do not have a day night toggle since they are not a light source, or a typical device. If set to true they will always be powered." The defaults are best reviewed before running a plugin or you may not have the experience you seek.

Funny I don't recall seeing that in the description before, otherwise you would have referenced that at the start of this thread, am I right? I don't think I missed it earlier, as I can read just fine, but anything is possible. I could be losing my mind. At any rate, I would have thought that the title alone would have prompted you to point that fact out from the start? Maybe not, maybe I am just an overcritical fool. But why would you waste time trying to figure out the issue and troubleshoot on your test instance as you stated earlier if this was all an "intentional" feature in the first place? That makes about zero sense to me. Nice try slipping that one past me. Lol. We can all just go back to pretending that you know what you're doing though. You must be one of those types that think you're incapable of making any mistakes.

By the way - the file is still not returning the correct language data for the nopermission value (ya know, the other thread I made two versions ago, where I gave you the code directly to fix it). If you don't want to improve your plugin, then simply don't. *shrug

I already moved on to something else. We are done here. Delete or disregard my support tickets, I have no interest in this any further.

It was there. I did not realize you had not read it. hmmm I will check on the language issue.
Locked automatically