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

also glob name

This commit is contained in:
reality 2015-03-14 09:59:16 +00:00
parent e523e35c73
commit 36372a511c

View File

@ -302,11 +302,11 @@ var commands = function(dbot) {
if(host) {
var results = [];
this.db.scan('notifies', function(notify) {
if(notify && _.has(notify, 'host') && notify.host == host) {
if(notify && _.has(notify, 'host') && (notify.host == host || notify.message.split(' ')[0] == nick)) {
results.push(notify.message);
}
}, function() {
event.reply(nick + ' has sought help ' + results.length + ' times under the host ' + host);
event.reply(nick + ' has sought help ' + results.length + ' times under the host ' + host + ' or nick ' + nick);
_.each(results, function(n) {
event.reply(n);
});