Vote Kick Player!
Created a system to allow vote kick player off the server for 1 hour.
This is a way of giving dealing with trolls without giving someone 100% power to perma ban or suspend accounts. And its entertaining way of dealing with trolls, cause people love to vote!
Must be $status > 0 to initiate a vote kick on a player, and can't vote against a player with $status > 0 too.
Currently requires 5 player vote within 15 minutes. (Can be edited)
Players get to vote once per 15 min and per toon getting voted to be kicked. This is limited by both IP and character name.
Once a vote is succeeded then the player and ALL accounts linked by IP will get immediately disconnected and suspended for 60 minutes.
The code goes into your global_player.pl so anyone in any zone can vote.
Requires telnet for disconnecting the player, unless there is easier way to remotely disconnect someone. The telnet code is there, so just need to edit the name/pass to reflect the same added to account table.
You can find the few places that require editing by searching for <EDIT HERE> in the code.
There are no plugins required, this code is 100% complete all in one file.
Requires 1 custom table named '_vote_kick' (sql to create this table is provided).
Probably reinvented the wheel on a few things, and stuff could be done more efficiently. So feel free to post suggestions, tweaks, feedback, etc.
(Code posted below)
|