From: Darren Date: Sat, 12 Jul 2014 16:56:31 +0000 (+0100) Subject: Move NICK command into commands/user.js X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6ffed2f6f099dec44100afaf31aae8ba00e4b34c;p=KiwiIRC.git Move NICK command into commands/user.js --- diff --git a/server/irc/commands/misc.js b/server/irc/commands/misc.js index 60feb3e..935a032 100644 --- a/server/irc/commands/misc.js +++ b/server/irc/commands/misc.js @@ -60,22 +60,6 @@ var handlers = { }, - NICK: function (command) { - var time; - - // Check if we have a server-time - time = command.getServerTime(); - - this.emit('user ' + command.nick + ' nick', { - nick: command.nick, - ident: command.ident, - hostname: command.hostname, - newnick: command.params[0], - time: time - }); - }, - - MODE: function (command) { var modes = [], event, time; diff --git a/server/irc/commands/user.js b/server/irc/commands/user.js index f67319f..f86cb4f 100644 --- a/server/irc/commands/user.js +++ b/server/irc/commands/user.js @@ -8,6 +8,22 @@ module.exports = function AddCommandHandlers(command_controller) { var handlers = { + NICK: function (command) { + var time; + + // Check if we have a server-time + time = command.getServerTime(); + + this.emit('user ' + command.nick + ' nick', { + nick: command.nick, + ident: command.ident, + hostname: command.hostname, + newnick: command.params[0], + time: time + }); + }, + + AWAY: function (command) { var time;