Since it's impossible to have an admin/moderator online on the server to enforce the rules letting people vote to kick or temporarily ban a player would be useful.
I know a developer did this on the server I play minecraft in. I'll ask him and see if he wants to work on C# instead of java ^_^
That's interesting. I have a file laying around for Minecraft that does that exact thing! Code: if (commandName.equals("voteban")) { if (plugin.VoteEngine != null) { if (!plugin.VoteEngine.type.equals("ban")) { return true; } plugin.VoteEngine.votesYes++; plugin.getServer().broadcastMessage(ChatColor.GOLD + "[SS] " + ply.getDisplayName() + ChatColor.RED + " voted to ban " + ChatColor.GOLD + plugin.VoteEngine.target + "."); return true; } if (args.length > 0 && ply.hasPermission("shankshock.voteban")) { if (plugin.getServer().getOnlinePlayers().length < 3) { sply.sendMessage("Unfortunately, you need more than 3 players before you can start a voteban."); //return true; } if (plugin.banLockedOut) { sply.sendMessage("This command was recently run. Please try again later."); return true; } plugin.getServer().broadcastMessage(ChatColor.GOLD + "[SS] " + ply.getDisplayName() + " (" + ply.getName() + ") would like to voteban " + ChatColor.RED + args[0] + ChatColor.GOLD + "."); plugin.getServer().broadcastMessage(ChatColor.GOLD + "[SS] " + "Need at least one player to motion the voteban. Type" + ChatColor.RED + " /motion " + ChatColor.GOLD + "if you wish to motion the voteban."); plugin.VoteEngine = new VoteEngine(); plugin.VoteEngine.initiator = ply.getName(); plugin.VoteEngine.target = args[0]; plugin.VoteEngine.type = "ban"; plugin.banLockedOut = true; int cooldown = Integer.parseInt(plugin.conn.keyValues.get("votebancooldown")); plugin.getServer().getScheduler().scheduleSyncDelayedTask(this.plugin, new VotebanMotionCheck(plugin), 600); plugin.getServer().getScheduler().scheduleSyncDelayedTask(this.plugin, new VotebanTimeoutUpdate(plugin), cooldown); return true; } sply.sendMessage("Voteban syntax: /voteban <playern name>"); return true; }
Code: public int PercentForKickBan = 50; public string PercentForKickBan_description = "Percent of users with kick or ban permission needed to kick or ban (Rounds up)"; public int VotesFromIP = 3; public string VotesFromIP_description = "Max number of votes from 1 IP address."; public bool DisableVoteWhenGroup = false; public string DisableVoteWhenGroup_description = "Disable votekick|voteban when any user in the specified group is logged in."; public string DisableVoteWhenGroupName = ""; public string DisableVoteWhenGroupName_description = "Name of group (or groups) for the above setting. Comma separated without spaces."; public bool DisableVoteWhenUser = false; public string DisableVoteWhenUser_description = "Disable votekick|voteban when a user is logged in."; public string DisableVoteWhenUserName = ""; public string DisableVoteWhenUserName_description = "Name of user (or users) for the above setting. Comma separated without spaces (Ex: \"Dingo,Emmett Brown,Inglip\")"; public int ActiveVoteTime = 60; public string ActiveVoteTime_description = "Time (in seconds) that the vote remains active."; Any other ideas for settings that should be in the config file? Edit: Added ActiveVoteTime, at Rosen's suggestion.
That could work. My idea was to remove a user's vote when they disconnect. I suppose your way is less 27th Amendmenty.
Honestly, I would do it, but my friend and I have moved on from playing Terraria. I'm working on Darkstar Project (I didn't name it. Yes I know it's ridiculous.) and some Ashita stuff for FFXI. Without my friend's server, I don't really have a place to test my plugins. Best of luck in finding a votekick, or someone to make one!
-insert some raging about how tshock community and devs suck- I was excited to see this thread, and I'll probably steal your config options if I manage to make it, as I might try to dev it myself. Although it might be a while as it would be my first TShock plugin I would make. (°─ °)
Just look at the current plugins and start from there. Luckily with HousingDistricts I had a basic starting point, despite Olink never committing his newer changes >.> I dunno, I might come back one day. But I've got FFXI to work on, DSP is actually a private FFXI server project, a ton of new games, and a once-again-restarted-from-scratch life to live. At least TShock was fairly straightforward, and in an easy language. DSP is C++/LUA, Ashita is C++/C#/LUA, and they're both giving me thought cancer.
Well, that sounds delightful! :'D (my soul cries for you) I took a look at your github and saw that you had voteban. Looked inside, and there was only an empty readme. ): Aww well.... Thanks for the pointers. I'll probably take a look at polls to see how to create a voting system. My Lua experience is pretty much all based in the quest system. x) I look forward to the day of your return!
It's such a logical thing to have, right? xD I only realized this after watching a friend play some Chivalry....
Honestly though, I swear SpectreWiz or someone made one... x people vote, and it kicks them. But I can't find it anywhere. Maybe I'm just crazy
SpectreWiz made Easy Vote: http://tshock.co/xf/index.php?threads/1-12-easy-vote.1303/ I was thinking of modifying it to allow the config to accept parameters?