making it work

This commit is contained in:
Hexagon 2014-10-20 19:14:44 +02:00
parent e221e9b662
commit 3461547dec
3 changed files with 14 additions and 12 deletions

View File

@ -79,8 +79,8 @@ define({
}
},
motd: function () {
commands.post('motd', settings.motd);
motd: function (message) {
commands.post('motd', message);
},
info: function (message) {
@ -165,7 +165,7 @@ define({
// Shout this command to all modules
mediator.emit(
'console:' + command,
'command:' + command,
payload,
function(retvals, recipients) {
if(!recipients) {

View File

@ -84,7 +84,7 @@ define(
connect = function (toHost, done) {
mediator.emit('console:lockinput');
mediator.emit('console:lockInput');
var
request,
@ -96,7 +96,7 @@ define(
mediator.emit('console:error', $.template(templates.messages.already_connected, {
host: host.name || 'localhost'
}));
mediator.emit('console:unlockinput');
mediator.emit('console:unlockInput');
return;
}
@ -109,7 +109,7 @@ define(
}
} else {
mediator.emit('console:error', 'Undefined host index: ' + toHost);
mediator.emit('console:unlockinput');
mediator.emit('console:unlockInput');
return;
}
@ -125,7 +125,7 @@ define(
return connect(toHost, done);
}, function () {
mediator.emit('console:error', 'Could not fetch host settings: ' + request);
mediator.emit('console:unlockinput');
mediator.emit('console:unlockInput');
return;
});
}
@ -196,7 +196,7 @@ define(
mediator.emit('window:title', host.settings.title);
// Unlock input
mediator.emit('console:unlockinput');
mediator.emit('console:unlockInput');
done();
@ -225,7 +225,7 @@ define(
mediator.emit('console:error', templates.messages.socket_error);
// Unlock input
mediator.emit('console:unlockinput');
mediator.emit('console:unlockInput');
});
return;

View File

@ -83,6 +83,8 @@ app.io.sockets.on('connection', function(socket) {
});
});
app.listen(8080, function(){
console.log('listening on *:8080');
var port = process.env.PORT || 8080;
app.listen(port, function(){
console.log('listening on *:'+port);
});