The idea behind this plugin is to enable only regular users to call on votes. There are two votes implemented, votemap and votekick.
Limiting votekick is to avoid noobs trying to kick out good players.
Limiting votemap is to avoid constant map changes by noobs. Also, it limits the votable maps.
Votekick should work on all games as this uses the bot's method of kicking. Votemap will work on games which use "map mapname" command to change map.
Regular users can be set by use of !makereg command or the !putgroup (though that command is by default limited to level 90 and above).
This code hasn't been thoroughly tested. Please report any bugs you find!
********* New functionality provided *********
!votekick or !vk
Initiate a votekick against a player.
The votes can only be initated by players above configured level. Admins can't be voted out.
If more than tempban_minvotes players vote, and more than tempban_percent of them are "yes", the player will be tempbanned for tempban_interval.
!votemap or !vm
Initate a votemap for a map.
If the map is in maplist.txt, a vote will be carried out. Players only need to write a substring of the map's name. For example, if they wish to vote "ut4_austria", they can type "!vm aus" (assuming no other map has that string in their name).
!maplist or !mapl
Lists all the available maps on the server. (Reads maplist.txt)
!voteyes or !vy
!voteno or !vn
Vote yes or no in the current vote.
!voteveto or !vveto
Veto the current vote
*** Configurable variables ***
min_level_*
Set the minimal level for the command.
vote_times
How many times the bot tells how the vote is going and asks for votes. When the times are up, the vote ends.
vote_interval
Approximate time between failed votes.
tempban_minvotes
tempban_interval
tempban_percent
If more than tempban_minvotes players vote, and more than tempban_percent of them are "yes", the player will be tempbanned for tempban_interval.
mapfile
File to read the allowed maps for voting.
Download:
Voting1.5.zip