dbot/modules/reality.js

23 lines
592 B
JavaScript
Raw Normal View History

2011-08-22 20:24:23 +02:00
var reality = function(dbot) {
var dbot = dbot;
return {
'listener': function(data, params) {
if(data.user == 'reality') {
var once = data.message.match(/I ([\d\w\s]* once)/);
if(once != null) {
dbot.db.realiPuns.push('reality ' + once[1] + '.');
dbot.instance.say(data.channel, '\'reality ' + once[1] + '.\' saved.');
dbot.save();
}
}
},
'on': 'PRIVMSG'
};
}
exports.fetch = function(dbot) {
return reality(dbot);
}