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

Concept for a Voteserver/ encapsulated personal vote option handler. #25

Open
jxsl13 opened this issue Sep 1, 2019 · 2 comments
Open
Labels
feature A bigger feature/feature request that might be added or not.

Comments

@jxsl13
Copy link
Owner

jxsl13 commented Sep 1, 2019

std::vector<std::pair<int, Msg>> - receiving id; List of messages, that represent the votelist updates
alternatively std::vector<std::pair<int, std::vector>>

might need to test performance

Basically we have the default vote list, that can be manipulated by the admin and below or above that we want to have the personalized vote options.

We need to have some container to save each player's personal votes. Might use a map [string] : <string,string> where the first mapped string is the vote description and the second the command, that is associated with the description.

(Normal votes are to be checked first and then the invoked vote description is to be matched against the mapped description.)

Vote updates should be able to directly modify the stecific vote command.

std::map<std::string, std::pairstd::string,std::string>[64]
<Identifying keyword, <description, command>
Each map needs to have a reset mechanism, when a player leaves and an initializer when je joins.

@jxsl13
Copy link
Owner Author

jxsl13 commented Sep 8, 2019

Add asynchronous stuff.
Every synchronously executed lambda function should be executed asynchronously and add data to a message list(mutexed access), in order to add the possibility to execute blocking functions that access the database.

@jxsl13
Copy link
Owner Author

jxsl13 commented Oct 8, 2019

Might as well wait, until the voting system has been reworked in vanilla?

@jxsl13 jxsl13 added the feature A bigger feature/feature request that might be added or not. label Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A bigger feature/feature request that might be added or not.
Projects
None yet
Development

No branches or pull requests

1 participant