Allow plugins to open new IRC connections
authorDarren <darren@darrenwhitlen.com>
Thu, 3 Apr 2014 15:56:03 +0000 (16:56 +0100)
committerDarren <darren@darrenwhitlen.com>
Thu, 3 Apr 2014 15:56:03 +0000 (16:56 +0100)
client/src/app.js

index 292010fdfba1757cb864b5e7a3b9760152b2301e..b4f86f83d58546a1590febca0a8b1a60f7e2a432 100644 (file)
@@ -153,6 +153,15 @@ _kiwi.global = {
     // Allow plugins to change the startup applet\r
     registerStartupApplet: function(startup_applet_name) {\r
         _kiwi.app.startup_applet_name = startup_applet_name;\r
+    },\r
+\r
+    /**\r
+     * Open a new IRC connection\r
+     * @param {Object} connection_details {nick, host, port, ssl, password, options}\r
+     * @param {Function} callback function(err, network){}\r
+     */\r
+    newIrcConnection: function(connection_details, callback) {\r
+        _kiwi.gateway.newConnection(connection_details, callback);\r
     }\r
 };\r
 \r