Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

votemanager: vote options can contain unplayable maps #2

Open
jlillis opened this issue Jul 15, 2020 · 0 comments
Open

votemanager: vote options can contain unplayable maps #2

jlillis opened this issue Jul 15, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@jlillis
Copy link
Owner

jlillis commented Jul 15, 2020

In certain scenarios, votemanager will allow players to vote for unplayable maps. Usually a new vote can be called, but if mapcycler has initiated the vote, a new vote isn't called automatically. mapmanager will just refuse to load the winning map and output an error to debugscript and the chat.

Invalid resources can include:

  • editor, editor_dump, editor_test, editor_map_backups
  • maps that have a #minplayer setting higher than the current player count
  • maps that have a #maxplayer setting lower than the current player count
@jlillis jlillis added the bug Something isn't working label Jul 15, 2020
@jlillis jlillis changed the title votemanager/mapcycler: vote options can contain unplayable maps votemanager: vote options can contain unplayable maps Jul 16, 2020
jlillis pushed a commit that referenced this issue Nov 10, 2020
…heftauto#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant