diff --git a/.config.example.json b/.config.example.json new file mode 100644 index 0000000..8631fdf --- /dev/null +++ b/.config.example.json @@ -0,0 +1,15 @@ +{ + "servers": { + "asd": { + "host": "domain.tld", + "port": 6667, + "secure": false, + "srvPassword": "example", + "nick": "bert", + "userName": "foo", + "realName": "bar" + } + }, + "sentry": "you should know what this is for. else remove it from index.js before running" +} + diff --git a/.gitignore b/.gitignore index 3c3629e..9ab93dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +.config.json diff --git a/index.js b/index.js index ce01ed3..fcfe822 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ "use strict"; - +const config = require('./.config.json'); const Raven = require('raven'); -Raven.config('https://10749fc75fc14fc5aa6b6212adbfe9ec:c291a65aa6014bb781232e0995f7a81d@sentry.njgz.de/4').install(); +Raven.config(config.sentry).install(); const Irc = require("irc"); const Mysql = require("mysql"); @@ -36,19 +36,20 @@ let irc = {}; //irc.client = new Irc.Client('irc.rizon.so', 'w0bm', { //irc.client = new Irc.Client('irc.n0xy.net', 'w0bm', { -irc.client = new Irc.Client('znc.gottz.de', 'w0bm', { + +irc.client = new Irc.Client(config.servers.n0xy.host, config.servers.n0xy.nick, { // channels: ["#gz", "#w0bm"], - port: 6667, - secure: false, + port: config.servers.n0xy.port, + secure: config.servers.n0xy.secure, retryCount: 12000, retryDelay: 3000, - userName: "Abdullah", - realName: "Fritz", + userName: config.servers.n0xy.userName, + realName: config.servers.n0xy.realName, debug: false, selfSigned: false, debugRaw: false, autoConnect: false, - password: "w0bm/n0xy:Roquaib7jae9miey3aey" + password: config.servers.n0xy.srvPassword }); if (process.env.NODE_ENV != 'production') {