Votifier2
New Update to the plugin
In the next day I am adding a feature that will allow players to vote IN GAME simply by typing /vote. The vote will be sent back to the list site vote page for that server and the vote can then be recorded. A "key" will be generated by the plugin that should be used to authenticate the votes.
More details to follow.
The NEW and Greatly Improved Votifier! RPGVotifier or Votifier2 OPEN BETA TEST
I have released 2 versions of the plugin.. these are BETA releases!
One for 1.6.4-1.7.2 and one for 1.2.5 (Tekkit)
Please report any difficulties.
It will be RE STARTED now!!!!
IF YOU HAVE A LIST ENGINE AND WANT TO IMPLEMENT THIS PLUGIN: Send me a message and I will be happy to help you put the vote page together.
Why this was done
As we all know, Votifier is pretty much outdated and dead.. It is unstable and unreliable. Recently I was contacted to either fix the old one or make a new one. I opted to make a new version, that is easier to use, more verbose and very easy to implement.
Notes about Security
A few people have expressed concern about not using AES and only using a password. If you do as well ask yourself what exactly is that encryption is protecting. The answer is nothing important. Aside from encrypting pointless data the AES encryption of the old votifier acted as sort of an authentication system for votes.
For both of those roles it was overkill and pointless, but for the old version it was needed because the old version did not protect itself from false votes, in fact if a player managed to get the public key they could vote as much as they wanted to.
So in this plugin the simple password does nothing more than authenticate an actual vote, as much as it can, and honestly it really is not needed. This plugin protects itself with an authentication system and a time based vote rule, which you can read about below.
I have also been told that this program is a possible exploit for bad voting or vote flooding. To those who think that let me assure you that ANY public IP with a listener of any sort, thats exposed to the cloud is or can be a target, just like the game server/port.
This plugin will NOT accept votes on a server for any player that has not played, so trying to flood it with fake names won't work.
When the protection is on it will reject all votes that have not waited the hours required for a new vote, they are also simply rejected.
In other words can this IP/Port be attacked.. well YES just like any other public IP/Port. It is no more or less vulnerable than any other.
Encryption is POINTLESS.. What are you trying to hide? A username seriously....?
Anyway thats all for now, if you have more question feel free to PM me or post them below in the comments.
Key Features
- NO MORE Public Key encryption, it was pointless and stupid. Instead we will just use a password.
- This Votifier is completely thread based it launches the socket listener in its own thread and when a vote comes in the handler is also launched on a separate thread.
- It implements a Sentry thread that "watches" the listener thread and will restart it if it is lost, dead or becomes unstable.
- It saves votes, so if the player votes offline and is a player on the server it will remember them so when they next log in they can collect the rewards.
- No more listeners! As a threaded application RPGVotifier also handles the player rewards as defined by a simple config file.
- Rewards also do an inventory check. Before giving the rewards to a player their inventory is checked for space. If not enough exists the player is asked to clear their inventory and try again.
- Slash commands with perm nodes were added to allow a use to see if they have rewards waiting ad to collect them. Op's can add or remove votes via slash commands as well.
- RPGVotifier implements a protection system, based upon player name to prevent abuse. This is an option you can set to allow voting after so many hours (0-???). Setting this to 0 turns off the feature. If a vote comes in and this is on it will check to be sure the player name has not voted in the set time frame.
I have also implemented a verbose response system so server lists can get detailed information about the vote as well as modes in which to send the vote.
Vote Modes
- normal: Normal rewards, if not online the rewards are saved and can be collected when the player returns.
- test: Return validation of connection and password
Vote Packet
[For listing site owners]
packet structure [mode:vote_site:player_name:password] as string.
You build the packet from strings. There is no set length however all four parts must be present, and separated with a colon(:)
Example Vote Packet
"normal:pixelmonservers.info:boduzapho:MyStr0ngpa55w0rd"
Vote Response Messages
- Bad Packet
- Bad Password
- Bad Vote Mode
- Test success
- No Such Player
- User Already Voted
- Vote processed okay
Misc.
There is much more and I will add to this later. The plugin is almost done testing and when i release it Ill will provide code samples for the following languages to use it (Its less complicated and less code than the old Votifier scripts):
- .Net C#
- .Net VB
- PHP
- Python
Also Database integration is VERY simple to do.
Thats all for now I will be adding more later.
How to send votes
* I am looking for a PHP person to convert this to PHP
If you want to help the community by sending me a conversion of the code below to PHP, that would be very helpful! Also conversion to any other relative languages would be very helpful as well.
In these examples, IP.Text and IPPort.Text are variables that represent the IP/Port to send the vote to. You can easily pass them to these functions as parameters or use a Public Variable in their place.
THESE EXAMPLES WERE A DIRECT CONVERSION!
YOU WILL OBVIOUSLY HAVE TO CHANGE SOME OF THE CODE BELOW, IT IS HERE TO GET YOU STARTED!
C# Example
Vote.Click += SendVote; public void SendVotesender, EventArgs e { byte[] bytes = new byte[1025]; IPAddress ipAddress = ipAddress.Parse(IP.Text); IPEndPoint remoteEP = new IPEndPoint(ipAddress, IPPort.Text); Socket sender = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); try { sender.Connect(remoteEP); byte[] msg = Encoding.ASCII.GetBytes(IPsend.Text.Trim + Environment.NewLine); int bytesSent = sender.Send(msg); int bytesRec = sender.Receive(bytes); Session("RES") = Encoding.ASCII.GetString(bytes, 0, bytesRec); sender.Shutdown(SocketShutdown.Both); sender.Close(); } catch (Exception ex) { Session("RES") = "Failed to connect, Check the settings for IP and Port."; } }
Java Example
private Vote.Click += SendVote; public final void SendVotesender, EventArgs e { byte[] bytes = new byte[1025]; IPAddress ipAddress = ipAddress.Parse(IP.Text); IPEndPoint remoteEP = new IPEndPoint(ipAddress, IPPort.Text); Socket sender = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); try { sender.Connect(remoteEP); byte[] msg = Encoding.ASCII.GetBytes(IPsend.Text.Trim + Environment.NewLine); int bytesSent = sender.Send(msg); int bytesRec = sender.Receive(bytes); Session("RES") = Encoding.ASCII.GetString(bytes, 0, bytesRec); sender.Shutdown(SocketShutdown.Both); sender.Close(); } catch (RuntimeException ex) { Session("RES") = "Failed to connect, Check the settings for IP and Port."; } }
VB.net Example
Public Sub SendVote() Dim bytes(1024) As Byte Dim ipAddress As IPAddress = ipAddress.Parse(IP.Text) Dim remoteEP As New IPEndPoint(ipAddress, IPPort.Text) Dim sender As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) Try sender.Connect(remoteEP) Dim msg As Byte() = Encoding.ASCII.GetBytes(IPsend.Text.Trim & vbNewLine) Dim bytesSent As Integer = sender.Send(msg) Dim bytesRec As Integer = sender.Receive(bytes) Session("RES") = Encoding.ASCII.GetString(bytes, 0, bytesRec) sender.Shutdown(SocketShutdown.Both) sender.Close() Catch ex As Exception Session("RES") = "Failed to connect, Check the settings for IP and Port." End Try End Sub
The BETA has been sent in for Approval
If you wish to beta test, you will need a Bukkit 1.6.2-1.6.4 Bukkit server or a compatible Forge or MCPC+ server.
For sending a vote you have TWO options.
1. Build a send vote page using the code above
2. Visit http://pixelmonservers.info/V2.aspx and use the public test form.
VOTE PACKET EXAMPLES
Normal vote: "normal:Pixelmonservers.info:boduzapho:w3s0m3pa55w0rd"
Test Vote "test:Pixelmonservers.info:boduzapho:w3s0m3pa55w0rd"
These are the format the plugin expects. There is no length requirement, but the syntax IS VERY important!!
It is four strings separated by colons{:} mode:server:name:password
Be sure the password you send matches the config file password.
How to Install
- Stop your server
- Place the jar file into your plugins folder.
- Start your server
- Wait for the server to completely start
- Stop the server
- Navigate to plugins/votifier2
- Modify the config file
Config File Sample
ip: 192.168.1.33 port: '8192' password: w3s0m3pa55w0rd protect: 1 debug: true Sentury: 60
- The IP that should be the ip of the server you're running it on.
- The port should be changed to one that will not conflict with other plugins, like votifier.
- The password is a string go nuts. (no really the crazier the better for YOU).
- Protect is an integer or number representing how many HOURS a user has to wait before voting again. 0 = no restriction
- Debug is a boolean (true or false) that when on will display verbose messages in the console window.
- Sentury is an integer that represents how often the save thread runs and saves the required data files in SECONDS.
execute.ini sample
simply add console commands, one per line and use <NAME> where the players name would be.
say <NAME> thanks for your vote! give <NAME> 264 2 eco give <NAME> 100
You will need to use the test site to send votes or build your own. Vote Test Page
It works... I have not worked on it in a long time as I have moved on from Minecraft. In fact I will be porting this to Oxide for Rust. The source is in the jars if someone wants to move on with it.
Thanks.
What happened? Is Votifier2 dead??
Just want to say that Votifier 2 should work at www.mymcserverlist.com
@Jagger433
I will be adding bungee support
And now I will be restarting it for a new server...
And new requests should be posted here
how do i add a vote fourm to meh webpage?
Is there anyway you can add support bungee?
This may seem like a noob question, but does this plugin support websites that require a public key (Not require, but to send to the corresponding server, data on who voted)? If so, what would you put in as a public key for those websites?
Hello there, i have just installed votifier2 on my 1.7.2 server and when doing /voteadd and /voteremove, it says that i don't have access to the commands, i'm looking for the permission nodes so that i can add them to my permissions file (groupmanager).
Thanks for your time BOB
Sorry I'm very new to having a sever, so I am not sure how to make it so Votifier works with planet minecraft, or any other places. Am I supposed to make my own long public key?? And if so..I'm sorry I can't seem to figure out how it should be done.
is there any way you can add a <service> or <sight> for showing the web sight that they vote from
also a forum would be nice
@dannob123
With Votifier2 you can give items broadcast messages and execute console commands when a vote arrives.
@dannob123
Yes that is correct, unless the voting site implements it, it will not work. However we are still considering making it work with votifier packets, so it is compatible with both.
So this plugin looks better than Votifier, But I miss GAListener :( but Ill have to deal with it!
But it does not work on other voting sites! like I tried MineStatus and did not work :(
My plugin does not I the ip port password protect and sentury changed. then I in minecraft-server.eu set the ip and port as well as in the plugin public key then the password entered the minecraft server reboot and a few test vote on the minecraft-server.eu page made have nothing I did something wrong or not working at all it on the site?
Please refrain from asking, silly, or off topic questions.
From this point further I will only allow questions that relate directly the the setup and use of this plugin for either the game server or voting sites. If you have any other questions or comments please send either author a PM.
I am sorry I have had some real life things to deal with, so I had to put this project on hold. I am back now so things should progress better.
ALSO I am happy to answer your questions, but I do not have the time to code these voting pages for you, however I will post a generic .Net solution from the test voting page in the next couple of days that can then be downloaded.
@snowfox12
You will have to be a bit more detailed with your question. Also a lot of that information is listed above.
@Nipshu
The BETA release does not accept console commands
@AnAwesomeGuy
The error you showed me is for remote debugging which I am quite sure your hosting company does not allow, it has nothing to do with the plugin socket code.
The code above is an example, that you need to improve upon for your own needs. As it is, stand alone, it will not run.
You would have to make a .net web page with form variables and process them in server side code where the example above would be used to send the vote to the server.