nbot

A clone of the eBot by @deStrO fully based on node.js with build in Web Page - WIP
git clone git://archive.git.mtrnord.blog/MTRNord/nbot.git
Log | Files | Refs | README | LICENSE

commit b0544e9fa212f68ffe03cf4ad374108fef3698d0
parent 23efad892f8db16f33c0142b5fa701ccee838918
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 25 Mar 2016 12:58:32 +0100

Fix functions

Diffstat:
Mbackend/addServer.js | 4++--
Mbackend/rcon.js | 8++++----
Mweb/server.js | 4++--
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/backend/addServer.js b/backend/addServer.js @@ -18,7 +18,7 @@ var addServer = module.exports = {} * @method start * @beta Work in Progress */ - addServer.start: function () { + addServer.start = function () { var req = https.request({ host: 'raw.githubusercontent.com', port: 443, @@ -60,6 +60,6 @@ var addServer = module.exports = {} /** * @method step2 */ - addServer.step2: function () { + addServer.step2 = function () { //TODO Start Script } diff --git a/backend/rcon.js b/backend/rcon.js @@ -17,7 +17,7 @@ var rcon_func = module.exports = {} /** * @method start */ - rcon_func.start: function () { + rcon_func.start = function () { rcon.connect().then(() => { return rcon.command('changelevel de_dust2').then(() => { console.log('changed map'); @@ -36,7 +36,7 @@ var rcon_func = module.exports = {} /** * @method restart_game */ - rcon_func.restart_game: function () { + rcon_func.restart_game = function () { rcon.connect().then(() => { return rcon.command('mp_restartgame 1').then(() =>{ console.log('game restarted'); @@ -52,7 +52,7 @@ var rcon_func = module.exports = {} * @method status * @return {String} Status from the Server. */ - rcon_func.status: function () { + rcon_func.status = function () { return rcon.connect().then(() => { return rcon.command('status') }).then( @@ -65,7 +65,7 @@ var rcon_func = module.exports = {} /** * @method live_on */ - rcon_func.live_on: function () { + rcon_func.live_on = function () { rcon.connect().then(() => { return rcon.command('mp_restartgame 1').then(() => { console.log('game restarted 0'); diff --git a/web/server.js b/web/server.js @@ -20,7 +20,7 @@ var server = module.exports = {}; /** * @method start */ - server.start: function () { + server.start = function () { app.get('/', function(req, res){ res.sendFile(__dirname + '/theme/index.html'); }); @@ -37,7 +37,7 @@ var server = module.exports = {}; /** * @method iojs */ - server.iojs: function () { + server.iojs = function () { io.on('connection', function (socket) { //senden an socket dass er verbunden ist //socket.emit('userOnline', {message: 'verbunden'});