mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 04:02:39 +01:00
notes fixes
This commit is contained in:
parent
4f269a5c02
commit
f097685c3d
@ -140,7 +140,7 @@ var commands = function(dbot) {
|
|||||||
var notes = {};
|
var notes = {};
|
||||||
this.db.search('warnings', {
|
this.db.search('warnings', {
|
||||||
'server': server,
|
'server': server,
|
||||||
'warnee': warnee.id
|
'warnee': target.id
|
||||||
}, function(warning) {
|
}, function(warning) {
|
||||||
if(warning.reason.match('#note')) {
|
if(warning.reason.match('#note')) {
|
||||||
notes[warning.time] = warning;
|
notes[warning.time] = warning;
|
||||||
@ -153,7 +153,8 @@ var commands = function(dbot) {
|
|||||||
|
|
||||||
var n = 0;
|
var n = 0;
|
||||||
_.each(nTimes, function(key) {
|
_.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++;
|
n++;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -171,6 +171,7 @@ var warning = function(dbot) {
|
|||||||
this.commands['~warn'].access = 'power_user';
|
this.commands['~warn'].access = 'power_user';
|
||||||
this.commands['~rmwarning'].access = 'power_user';
|
this.commands['~rmwarning'].access = 'power_user';
|
||||||
this.commands['~rmlastwarning'].access = 'power_user';
|
this.commands['~rmlastwarning'].access = 'power_user';
|
||||||
|
this.commands['~addnote'].regex = [/addnote ([^ ]+) (.+)/, 3];
|
||||||
this.commands['~addnote'].access = 'power_user';
|
this.commands['~addnote'].access = 'power_user';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user