mirror of
https://github.com/reality/dbot.git
synced 2024-11-30 16:09:27 +01:00
Report module uses strings.json [#88]
This commit is contained in:
parent
168d1335aa
commit
042f6b2236
@ -21,18 +21,21 @@ var report = function(dbot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(var i=0;i<ops.length;i++) {
|
for(var i=0;i<ops.length;i++) {
|
||||||
dbot.say(event.server, ops[i],
|
dbot.say(event.server, ops[i], dbot.t('report', {
|
||||||
'Attention: ' + event.user + ' has reported ' +
|
'reporter': event.user,
|
||||||
nick + ' in ' + channelName + '. The reason ' +
|
'reported': nick,
|
||||||
'given was: "' + reason + '."');
|
'channel': channelName,
|
||||||
|
'reason': reason
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
event.reply('Thank you, ' + nick + ' has been reported the channel administrators.');
|
event.reply(dbot.t('reported', { 'reported': nick }));
|
||||||
} else {
|
} else {
|
||||||
event.reply('User is not in that channel.');
|
event.reply(dbot.t('user_not_found', { 'reported': nick,
|
||||||
|
'channel': channelName }));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
event.reply('I am not in that channel.');
|
event.reply(dbot.t('not_in_channel', { 'channel': channelName }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
modules/report/strings.json
Normal file
14
modules/report/strings.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"report": {
|
||||||
|
"english": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{reason}.\""
|
||||||
|
},
|
||||||
|
"reported": {
|
||||||
|
"english": "Thank you, {reported} has been reported to the channel administrators."
|
||||||
|
},
|
||||||
|
"user_not_found": {
|
||||||
|
"english": "{reported} does not appear to be in {channel}."
|
||||||
|
},
|
||||||
|
"not_in_channel": {
|
||||||
|
"english": "I am not present in {channel}."
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user