basic, ugly library for communicating with the OpenTTD admin interface from node.js
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.markdown
adminconnection.js
binary.js
date.js
node-bufferlist.js
node-put.js
tcp_enum.js

README.markdown

node-ottdadmin

this is an (ugly) library for communicating with the openttd admin interface using node.js

Basic Example

var AdminConnection = require('node-ottdadmin/adminconnection');
var tcp_enum        = require('node-ottdadmin/tcp_enum');
var net             = require('net');

var connection = AdminConnection(net.createConnection(3977), "password");
connection.on('welcome', function() {
    console.log("connected");
    connection.send_chat(tcp_enum.Actions.SERVER_MESSAGE, tcp_enum.DestTypes.BROADCAST, 0, "hello, world!");
    connection.send_quit();
    console.log("disconnected");
});