This commit is contained in:
Flummi 2016-08-11 10:42:51 +02:00
parent 521d1a5447
commit f1c0139b7f

View File

@ -1 +1,31 @@
var cfg = require('../../cfg.json');
var bot = require('coffea')(); var bot = require('coffea')();
cfg.server.forEach((e,i,a)=>{
bot.add({
"name": e.name,
"host": e.host,
"port": e.port,
"ssl": e.ssl,
"ssl_allow_invalid": e.ssl_allow_invalid,
"pass": e.pass,
"nick": e.nick,
"username": e.username,
"realname": e.realname
});
console.log("Server "+e.name+" wurden geladen");
});
bot.on('motd', (e) => {
console.log("motd von "+e.network+" erhalten");
//if(g_server[e.network].channels.length > 0) {
// bot.join( JSON.parse( g_server[e.network].channels ) );
//}
});
bot.on('message', (e) => {
var orig = e.message;
if(orig.match(/f0ck you/i)) {
e.reply("no, f0ck you leatherman!");
}
});