0.0
No commit activity in last 3 years
No release in over 3 years
maniaplanet-rpc is a library for interfacing with maniaplanet servers using its custom variant of xml-rpc
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

maniaplanet-rpc

Maniaplanet RPC is a Ruby implementation of the XML-RPC variant used by Maniaplanet games (Trackmania, Shootmania). The intended usage is creating custom controllers using the Ruby programming language, rather PHP, which is the default.

Installation

To install the gem, run the following command:

gem install maniaplanet-rpc

Or if you are using a Gemfile:

gem 'maniaplanet-rpc'

Usage

First, ensure that you have XML-RPC activated in your maniaplanet server. Assuming it listens on port 5000 on your local pc:

require 'maniaplanet_rpc'

client = ManiaRPC::ManiaClient.new "127.0.0.1", 5000
client.call "EnableCallbacks", true # Anonymous call (no response)
client.call "GetStatus" do |response| # Handle the response
  puts response
end

client.on "TrackMania.PlayerChat" do |message| # Handle a callback
  puts "Someone said something!"
end

client.all do |message| # Handle all callbacks
  puts "Callback: #{message}"
end

Issues

None currently known. Report on the issue tracker if you find any!

Credits

Johan Ljungberg - Initial implementation Nadeo - Providing the awesome platform and games