|
|
|
@ -8,11 +8,12 @@ var create = module.exports.create = function(filePath, backingStore) {
|
|
|
|
|
|
|
|
|
|
var file = Fs.createWriteStream(filePath, {flags: 'a+'});
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
message: function(channel, msg, callback) {
|
|
|
|
|
var originalMessageFunction = backingStore.message;
|
|
|
|
|
|
|
|
|
|
backingStore.message = function(channel, msg, callback) {
|
|
|
|
|
message(file, msg);
|
|
|
|
|
backingStore.message(channel, msg, callback);
|
|
|
|
|
},
|
|
|
|
|
getMessages: backingStore.getMessages
|
|
|
|
|
originalMessageFunction(channel, msg, callback);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return backingStore;
|
|
|
|
|
};
|
|
|
|
|