mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 03:33:07 +01:00
Revert "Logging modules added (requires jsbot support for multi-listeners)."
This reverts commit 9d5cf694a8
.
This commit is contained in:
parent
c35ffe3228
commit
03e152cc2c
@ -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);
|
||||
};
|
Loading…
Reference in New Issue
Block a user