Move NICK command into commands/user.js
authorDarren <darren@darrenwhitlen.com>
Sat, 12 Jul 2014 16:56:31 +0000 (17:56 +0100)
committerDarren <darren@darrenwhitlen.com>
Sat, 12 Jul 2014 16:56:31 +0000 (17:56 +0100)
server/irc/commands/misc.js
server/irc/commands/user.js

index 60feb3e38fb987ca9b25cd1bd381a96f969879dd..935a032588dbebb3bfdaa2a92a9147926860163f 100644 (file)
@@ -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;
 
index f67319f21f7c6bb40a4f7e9754c5066d853188d6..f86cb4fb4bad9ef995b927497e1c32523021c7cd 100644 (file)
@@ -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;