You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
votemanager: added additional resource settings for ban votes (#192)
* votemanager: store empty string for vote reason instead of nil if none is provided
Saving nil in a table seems to have odd side effects when further adding key values to it.
local tab = {true,false,false,nil,5} tab.cheese = "Yes" local a,b,c,d,e = unpack (tab) outputChatBox(tostring(e))
Should output 5 but instead outputs nil. If I remove the tab.cheese = "Yes"
local tab = {true,false,false,nil,5} local a,b,c,d,e = unpack (tab) outputChatBox(tostring(e))
It will correctly output 5 again. However I don't see any easy and clean way to get around it, as votemanager depends on some further modification of the tables and unpacking them later to work properly. Turning the vote reason into an empty string "" sounds like a rather small sacrifice to ensure proper functionality.
* votemanager: add additional voteban settings for server owners
banPlayer provides a lot of banning options, none of which votemanager currently supports changing. This commit adds settings to the meta.xml for the following settings: voteban_banip true/false (default: true); voteban_banusername true/false (default: false); voteban_banserial true/false (default: false); voteban_duration number in seconds (default: 3600)
* votemanager: add additional voteban settings for server owners #2
addendum to previous commit
banPlayer provides a lot of banning options, none of which votemanager currently supports changing. This commit adds settings to the meta.xml for the following settings: voteban_banip true/false (default: true); voteban_banusername true/false (default: false); voteban_banserial true/false (default: false); voteban_duration number in seconds (default: 3600)
* votemanager: store empty string for vote reason instead of nil if none is provided addendum
Removed unnecessary reason == "" from kill votes as it is never used after the initial use.
* changed default voteban behavior from IP to serial
0 commit comments