Giter VIP home page Giter VIP logo

votifier's Introduction

Votifier

Votifier is a Bukkit plugin whose purpose is to be notified (aka votified) when a vote is made on a Minecraft server top list for the server. Votifier creates a lightweight server that waits for connections by Minecraft server lists and uses a simple protocol to get the required information. Votifier is secure, and makes sure that all vote notifications are delivered by authentic top lists.

Configuring Votifier

Votifier configures itself the first time it is run.

If you want to customize Votifier, simply the edit ./plugins/votifier/config.yml file.

Writing Vote Listeners

A vote listener implements the VoteListener interface which contains an implementation of the voteMade method.

A basic vote listener looks something like this:

import com.vexsoftware.votifier.model.Vote;
import com.vexsoftware.votifier.model.VoteListener;

public class BasicVoteListener implements VoteListener {

    public void voteMade(Vote vote) {
	    System.out.println("Received: " + vote);
    }

}

Compiling Vote Listeners

Vote listeners can be compiled by including Votifier in the class path. For example:

javac -cp Votifier.jar FlatfileVoteListener.java

Encryption

Votifier uses one-way RSA encryption to ensure that only a trusted toplist can tell Votifier when a vote has been made. When it is first run, Votifier will generate a 2048 bit RSA key pair and store the keys in the ./plugins/votifier/rsa directory. When you link Votifier with a toplist, the toplist will ask you for your Votifier public key - this is located at ./plugins/votifier/rsa/public.key and the toplist will use this key to encrypt vote data. It is essential that you do not share these keys with your players, as a smart player can use the key to create a spoof packet and tell Votifier that they voted when they really didn't.

Protocol Documentation

This documentation is for server lists that wish to add Votifier support.

A connection is made to the Votifier server by the server list, and immediately Votifier will send its version in the following packet:

"VOTIFIER <version>"

Votifier then expects a 256 byte RSA encrypted block (the public key should be obtained by the Votifier user), with the following format:

Type Value
string VOTE
string serviceName
string username
string address
string timeStamp
byte[] empty

The first string of value "VOTE" is an opcode check to ensure that RSA was encoded and decoded properly, if this value is wrong then Votifier assumes that there was a problem with encryption and drops the connection. serviceName is the name of the top list service, username is the username (entered by the voter) of the person who voted, address is the IP address of the voter, and timeStamp is the time stamp of the vote. Each string is delimited by the newline character \n (byte value 10). The space block is the empty space that is left over, the block must be exactly 256 bytes regardless of how much information it holds.

votifier's People

Contributors

blakeman8192 avatar kramerc avatar javacraft avatar dumptruckman avatar dykam avatar evandarwin avatar nate302 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.