3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

Revert "Logging modules added (requires jsbot support for multi-listeners)."

This reverts commit 9d5cf694a8.
This commit is contained in:
Luke Slater 2012-03-27 15:06:23 +01:00
parent c35ffe3228
commit 03e152cc2c

View File

@ -1,41 +0,0 @@
var logging = function(dbot) {
var logMessage = function(message) {
if(!(dbot.hasOwnProperty('log'))) {
dbot['log'] = [];
}
dbot.log.push([Date.now(), message]);
};
return {
'onLoad': function() {
logMessage({
'type': 'LoggerEvent',
'details': 'Logger loaded.'
});
return {};
},
'onDestroy': function() {
logMessage({
'type': 'LoggerEvent',
'details': 'Logger unloaded.'
});
},
'listener': function(data, eventType) {
logMessage({
'type': 'IRCEvent',
'details': {
'eventType': eventType,
'data': data
}
});
},
'on': ['JOIN', 'PART', 'KICK', 'PRIVMSG', 'MODE']
};
};
exports.fetch = function(dbot) {
return logging(dbot);
};