diff options
Diffstat (limited to 'webchat/serverCommands.js')
-rw-r--r-- | webchat/serverCommands.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/webchat/serverCommands.js b/webchat/serverCommands.js deleted file mode 100644 index 303c4805..00000000 --- a/webchat/serverCommands.js +++ /dev/null @@ -1,26 +0,0 @@ -var serverCommands = {}; - -serverCommands.coi = function (serverstate, settings, params, id) { - return settings.conn.write({ result: { nick: settings.nick, addr: settings.addr}, id: id}) -} - -serverCommands.say = function (serverstate, settings, params, id) { - var nick = settings.nick - var message = params.msg - params.nick = nick - serverstate.irc_client.say("#krebs", nick + ' → ' + message); - return serverstate.clients.notifyAll('message', params) -} - -serverCommands.nick = function (serverstate, settings, params, id) { - var oldnick = settings.nick - var newnick = params.nick - settings.nick = newnick - return serverstate.clients.notifyAll('nickchange', { nick: oldnick, newnick: newnick }); -} - -serverCommands.badcommand = function (serversate, settings, params, id) { - settings.conn.write(JSON.stringify({ method: 'usererror', params: { message: 'bad command' }})) -} - -module.exports = serverCommands |