summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorJoe Robinson <joe@grabyo.com>2016-03-30 14:27:12 +0100
committerJoe Robinson <joe@grabyo.com>2016-03-30 14:27:12 +0100
commit1f6adc7f3c31505f1ad50df3da981987f39f43f0 (patch)
tree6d16d434439284dabc364350862841c9b5be42bc /index.js
parentcd0e34fcce48f4f88a87d0c4f166b4d8cd5c3904 (diff)
Added config for server/nick/channels
Diffstat (limited to 'index.js')
-rw-r--r--index.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/index.js b/index.js
index f4fc162..15a366a 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,8 @@
var linkify = require("linkifyjs");
var linkifyHtml = require('linkifyjs/html');
var shell = require('electron').shell;
-const myNick = "wclient";
+var config = require('./config.json')
+const myNick = config.nick;
$(document).ready(function() {
$("#send-message").focus();
@@ -14,8 +15,8 @@ $(document).on('click', 'a[href^="http"]', function(event) {
const irc = require('irc');
-var channels = ["#wtest", "#wtest2"]
-const client = new irc.Client('irc.blatech.net', myNick, {
+var channels = config.channels
+const client = new irc.Client(config.server, myNick, {
channels: channels,
userName: [myNick]
});