notes fixes

This commit is contained in:
reality 2018-02-10 12:47:54 +00:00
parent 4f269a5c02
commit f097685c3d
2 changed files with 4 additions and 2 deletions

View File

@ -140,7 +140,7 @@ var commands = function(dbot) {
var notes = {};
this.db.search('warnings', {
'server': server,
'warnee': warnee.id
'warnee': target.id
}, function(warning) {
if(warning.reason.match('#note')) {
notes[warning.time] = warning;
@ -153,7 +153,8 @@ var commands = function(dbot) {
var n = 0;
_.each(nTimes, function(key) {
event.reply('['+n+'][\u00036note\u000f][' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + notes[key].reason);
// just couldn't be bothered doing the warner lookup, waste of time
event.reply('[\u00036note ' + n + '\u000f][' + moment(parseInt(key)).format('DD/MM/YYYY') + ']['+notes[key].warner.split('.')[0]+'] ' + notes[key].reason);
n++;
});
} else {

View File

@ -171,6 +171,7 @@ var warning = function(dbot) {
this.commands['~warn'].access = 'power_user';
this.commands['~rmwarning'].access = 'power_user';
this.commands['~rmlastwarning'].access = 'power_user';
this.commands['~addnote'].regex = [/addnote ([^ ]+) (.+)/, 3];
this.commands['~addnote'].access = 'power_user';
};