forked from GitHub/dbot
also glob name
This commit is contained in:
parent
e523e35c73
commit
36372a511c
@ -302,11 +302,11 @@ var commands = function(dbot) {
|
|||||||
if(host) {
|
if(host) {
|
||||||
var results = [];
|
var results = [];
|
||||||
this.db.scan('notifies', function(notify) {
|
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);
|
results.push(notify.message);
|
||||||
}
|
}
|
||||||
}, function() {
|
}, 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) {
|
_.each(results, function(n) {
|
||||||
event.reply(n);
|
event.reply(n);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user