3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00
This commit is contained in:
reality 2015-12-09 19:00:39 +00:00
parent eebf1d9680
commit 890103e4ab

View File

@ -47,8 +47,10 @@ var tell = function(dbot) {
if(_.has(tells, event.rUser.id)) {
var done = [];
_.each(tells[event.rUser.id], function(tell, i) {
event.reply('Dear ' + event.user + ', ' + tell.from + ' left you a message: ' + tell.message);
tells[event.rUser.id].splice(i, 1);
if(event.channel == tell.channel) {
event.reply('Dear ' + event.user + ', ' + tell.from + ' left you a message: ' + tell.message);
tells[event.rUser.id].splice(i, 1);
}
}); // i disgust me
tells[event.rUser.id] = _.without(tells[event.rUser.id], done);
}