fixed client removal, joining, etc.

This commit is contained in:
Logsol 2013-01-03 23:05:27 +01:00
parent 2183e70bd8
commit 69fd43a900
6 changed files with 69 additions and 50 deletions

View file

@ -17,7 +17,12 @@ function (Parser) {
}
Helper.runCommands = function (message, callback) {
var commands = Parser.decode(message);
var commands;
if (typeof message == "string") {
commands = Parser.decode(message);
} else {
commands = message;
}
for(var command in commands) {
callback(command, commands[command]);