3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00
This commit is contained in:
reality 2013-08-28 17:35:11 +00:00
parent 4b36fc33b1
commit c5a3d75d29
2 changed files with 4 additions and 7 deletions

View File

@ -10,7 +10,7 @@
"it": "{user} a {num} avvertenze. Ulteriori informazioni si trovano a {url}"
},
"warn_notify": {
"en": "Attention: {warner} has issued a warning to {warnee} for \"{reason}.\" More info can be found at {url}",
"en": "{warner} has issued a warning to {warnee} for \"{reason}.\" More info can be found at {url}",
"fr": "Attention : {warner} a donné un avertissement à {warnee} pour \"{reason}.\". Plus d'informations peuvent être trouvées ici : {url}",
"it": "Attenzione : {warner} ha dato un' avvertenza a {warnee} per \"{reason}.\". Ulterior informazioni si trovano a {url}"
}

View File

@ -7,7 +7,7 @@ var warning = function(dbot) {
var warner = event.rUser,
server = event.server,
reason = event.input[2],
adminChannel = dbot.config.servers[server].admin_channel;
adminChannel = dbot.config.servers[server].admin_channel || event.channel.name;
dbot.api.users.resolveUser(server, event.input[1], function(warnee) {
if(warnee) {
@ -27,12 +27,9 @@ var warning = function(dbot) {
'url': dbot.api.web.getUrl('warning/' + server + '/'
+ warnee.primaryNick)
});
if(_.isUndefined(adminChannel)) {
adminChannel = event.channel.name;
}
dbot.api.report.notify(server, adminChannel, notifyString);
dbot.api.report.notify('warn', event.server, event.rUser, adminChannel, notifyString);
dbot.say(server, adminChannel, notifyString);
dbot.say(server, warnee.currentNick, notifyString);
});
} else {
event.reply(dbot.t('warnee_not_found', { 'user': event.input[1] }));