-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhoggle.js
42 lines (32 loc) · 858 Bytes
/
hoggle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var Domo = require('domo-kun');
var nconf = require('nconf');
var http = require('http');
nconf.argv()
.env()
.file('config.json');
var config = {
nick: 'hoggle',
userName: 'hoggle',
realName: 'Hoggle',
address: 'irc.freenode.org',
channels: ['#utahjs'],
users: [
{
username: nconf.get('botadminuser'),
password: nconf.get('botadminpass')
}
],
debug: true
};
var bot = new Domo(config);
// **** MODULES ****
var mod_example = require('./modules/example')(bot);
var mod_whereis = require('./modules/whereis')(bot);
var mod_8ball = require('./modules/8ball')(bot);
bot.connect();
// Webserver required for heroku
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('Hi. I\'m Hoggle');
res.end();
}).listen( process.env.PORT || 5000);