From 1f6adc7f3c31505f1ad50df3da981987f39f43f0 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Wed, 30 Mar 2016 14:27:12 +0100 Subject: Added config for server/nick/channels --- index.js | 7 ++++--- package.json | 6 +++++- 2 files changed, 9 insertions(+), 4 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] }); diff --git a/package.json b/package.json index 9ebf504..60e1d96 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,13 @@ { "name": "blachat", "version": "0.1.0", + "description": "A modern IRC client", + "license": "GPL-3.0", + "repository": "http://www.blatech.co.uk/wjoe/blachat", "main": "main.js", "dependencies": { "semantic-ui": "^2.1.8", "linkifyjs": "2.0.0-beta.9", - "irc": "0.5.0" } + "irc": "0.5.0", + "electron-prebuilt": "0.37.3" } } -- cgit v1.2.3