npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

flhook

v0.3.0

Published

Freelancer Hook client library

Downloads

13

Readme

flhook - a node.js/io.js Freelancer Hook client

This is a work in progress Freelancer Hook client library for node.js/io.js.

Install with:

npm install flhook

Usage

Here a simple how to use example:

var flhook = require('flhook');
var client = flhook.createClient();

client.on('ready', function() {
	console.log('FLHook client is ready to use');

	client.getcash('Fank', function(err, data) {
		if (err) {
			console.error(err);
		}
		else {
			console.log(data[0]);
		}
	});
});
console.on('error', function(err) {
	console.error(err);
});

API

Connection Events

"connect"

client will emit connect a connection is established to the Freelancer Hook server. But the server is not ready to receive commands.

"ready"

client will emit ready the welcome message is received and commands can be received.

"error"

client will emit error when encountering an connection error or unhandled exception.

"event"

client will emit event when a server event is received. Only works if eventmode is enabled via client.enable_eventmode().

flhook.createClient()

overloading

  • flhook.createClient() = flhook.createClient(1919, 'localhost', {});
  • flhook.createClient(options) = flhook.createClient(1919, 'localhost', options);
  • flhook.createClient(port, host, options);

The current only supported call is flhook.createClient(port, host, options) unless the authentification method is added.

client.execute(args...)

args is the command which will be executed.

client.enableEventmode(callback)

This enabled the eventmode, events will be received via event event.

client.getcash(args...)

Predefined call, same as client.execute('getcash', args...).

client.setcash(args...)

Predefined call, same as client.execute('setcash', args...).

client.setcashsec(args...)

Predefined call, same as client.execute('setcashsec', args...).

client.addcash(args...)

Predefined call, same as client.execute('addcash', args...).

client.addcashsec(args...)

Predefined call, same as client.execute('addcashsec', args...).

client.kick(args...)

Predefined call, same as client.execute('kick', args...).

client.ban(args...)

Predefined call, same as client.execute('ban', args...).

client.unban(args...)

Predefined call, same as client.execute('unban', args...).

client.kickban(args...)

Predefined call, same as client.execute('kickban', args...).

client.msg(args...)

Predefined call, same as client.execute('msg', args...).

client.msgs(args...)

Predefined call, same as client.execute('msgs', args...).

client.msgu(args...)

Predefined call, same as client.execute('msgu', args...).

client.fmsg(args...)

Predefined call, same as client.execute('fmsg', args...).

client.fmsgs(args...)

Predefined call, same as client.execute('fmsgs', args...).

client.fmsgu(args...)

Predefined call, same as client.execute('fmsgu', args...).

client.beam(args...)

Predefined call, same as client.execute('beam', args...).

client.kill(args...)

Predefined call, same as client.execute('kill', args...).

client.resetrep(args...)

Predefined call, same as client.execute('resetrep', args...).

client.setrep(args...)

Predefined call, same as client.execute('setrep', args...).

client.enumcargo(args...)

Predefined call, same as client.execute('enumcargo', args...).

client.addcargo(args...)

Predefined call, same as client.execute('addcargo', args...).

client.removecargo(args...)

Predefined call, same as client.execute('removecargo', args...).

client.rename(args...)

Predefined call, same as client.execute('rename', args...).

client.deletechar(args...)

Predefined call, same as client.execute('deletechar', args...).

client.readcharfile(args...)

Predefined call, same as client.execute('readcharfile', args...).

client.writecharfile(args...)

Predefined call, same as client.execute('writecharfile', args...).

client.setadmin(args...)

Predefined call, same as client.execute('setadmin', args...).

client.getadmin(args...)

Predefined call, same as client.execute('getadmin', args...).

client.deladmin(args...)

Predefined call, same as client.execute('deladmin', args...).

client.getreservedslot(args...)

Predefined call, same as client.execute('getreservedslot', args...).

client.setreservedslot(args...)

Predefined call, same as client.execute('setreservedslot', args...).

client.rehash(args...)

Predefined call, same as client.execute('rehash', args...).

client.loadplugins(args...)

Predefined call, same as client.execute('loadplugins', args...).

client.loadplugin(args...)

Predefined call, same as client.execute('loadplugin', args...).

client.listplugins(args...)

Predefined call, same as client.execute('listplugins', args...).

client.unloadplugin(args...)

Predefined call, same as client.execute('unloadplugin', args...).

client.pauseplugin(args...)

Predefined call, same as client.execute('pauseplugin', args...).

client.unpauseplugin(args...)

Predefined call, same as client.execute('unpauseplugin', args...).

client.getgroupmembers(args...)

Predefined call, same as client.execute('getgroupmembers', args...).

client.getbasestatus(args...)

Predefined call, same as client.execute('getbasestatus', args...).

client.getclientid(args...)

Predefined call, same as client.execute('getclientid', args...).

client.getplayerinfo(args...)

Predefined call, same as client.execute('getplayerinfo', args...).

client.xgetplayerinfo(args...)

Predefined call, same as client.execute('xgetplayerinfo', args...).

client.getplayers(args...)

Predefined call, same as client.execute('getplayers', args...).

client.xgetplayers(args...)

Predefined call, same as client.execute('xgetplayers', args...).

client.getplayerids(args...)

Predefined call, same as client.execute('getplayerids', args...).

client.getaccountdirname(args...)

Predefined call, same as client.execute('getaccountdirname', args...).

client.savechar(args...)

Predefined call, same as client.execute('savechar', args...).

client.isloggedin(args...)

Predefined call, same as client.execute('isloggedin', args...).

client.isonserver(args...)

Predefined call, same as client.execute('isonserver', args...).

client.serverinfo(args...)

Predefined call, same as client.execute('serverinfo', args...).

client.moneyfixlist(args...)

Predefined call, same as client.execute('moneyfixlist', args...).

client.help(args...)

Predefined call, same as client.execute('help', args...).