Skip to content

Commit

Permalink
Make conf.js actually json.
Browse files Browse the repository at this point in the history
  • Loading branch information
jirwin committed Nov 10, 2014
1 parent f3707f8 commit 5e5afe1
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
conf.js
conf.json
*.swp
node_modules/*
2 changes: 1 addition & 1 deletion bin/treslek.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var logstashSink = require('logmagic-logstash').LogstashSink;


var treslek = require('../lib/treslek');
var conf = require('../conf').conf;
var conf = require('../conf.json');

var logstash = new logstashSink('bubba', '162.209.99.44', 9999);

Expand Down
40 changes: 0 additions & 40 deletions conf.js.dist

This file was deleted.

38 changes: 38 additions & 0 deletions conf.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"nick": "treslekbot",
"host": "localhost",
"ircOptions": {
"port": 6667,
"channels": ["##treslek"],
"userName": "treslekbot",
"realName": "treslekbot",
"autoConnect": false,
"floodProtection": true,
"floodProtectionDelay": 100
},
"ignored": ["doslek"],
"commandPrefix": "!",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"prefix": "treslek"
},
"topics": {
"separator": "::",
"prefixes": {
"##treslek": "Treslek"
}
},
"webhook": {
"host": "0.0.0.0",
"port": "1304",
"channelKey": "webhookChannels"
},
"logstash": {
"host": "localhost",
"port": 9999
},
"admins": ["jirwin", "morgabra"],
"plugins": [],
"plugins_dir": "/vagrant/plugins"
}
4 changes: 0 additions & 4 deletions lib/sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,12 @@ var Sandbox = function(conf, irc, redis, commands, usage) {
},

redisConf: _.clone(conf.redis),
pluginsConf: _.clone(conf.plugins_conf),

commands: commands,

config: {
nick: conf.nick,
topics: conf.topics,
github: conf.github,
comics: conf.comics,
rackspace: conf.rackspace,
commandPrefix: conf.commandPrefix
},

Expand Down
2 changes: 1 addition & 1 deletion scripts/install_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var path = require('path');
var npm = require('npm');
var async = require('async');

var config = require('../conf.js').conf;
var config = require('../conf.json');

function main() {
npm.load(null, function(err) {
Expand Down

0 comments on commit 5e5afe1

Please sign in to comment.