Correctly using /quit command without reconnecting #567
[KiwiIRC.git] / client / src / misc / clientuicommands.js
index eff0dcf2f8b68b027ea9026ccdc3ac40265bc92d..e20b387bb7ede259f6cfb8c17a6c981dd3b69efc 100644 (file)
@@ -75,6 +75,7 @@
         'command:kick':        kickCommand,
         'command:clear':       clearCommand,
         'command:ctcp':        ctcpCommand,
+        'command:quit':        quitCommand,
         'command:server':      serverCommand,
         'command:whois':       whoisCommand,
         'command:whowas':      whowasCommand,
     }
 
 
+    function quitCommand (ev) {
+        var network = this.app.connections.active_connection;
+
+        if (!network)
+            return;
+
+        network.gateway.quit(ev.params.join(' '));
+    }
+
+
     function serverCommand (ev) {
         var that = this,
             server, port, ssl, password, nick,