mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
missing usage
This commit is contained in:
commit
5879baeff5
@ -19,7 +19,7 @@
|
||||
"en": "Usage for {command}: {usage}.",
|
||||
"na'vi": "Nga tsun sivar ìlä {command}: {usage}.",
|
||||
"cy": "Defnydd o {command}: {usage}.",
|
||||
"nl": "{command} wordt op de volgende manier gebruikt: {usage}.".
|
||||
"nl": "{command} wordt op de volgende manier gebruikt: {usage}.",
|
||||
"de": "Benutzung von {command}: [usage}."
|
||||
},
|
||||
"no_usage_info": {
|
||||
|
@ -47,11 +47,18 @@ var commands = function(dbot) {
|
||||
reason = event.input[2],
|
||||
channels = dbot.config.servers[server].channels;
|
||||
|
||||
_.each(channels, function(channel) {
|
||||
var i = 0;
|
||||
var banChannel = function(channels) {
|
||||
if(i >= channels.length) return;
|
||||
var channel = channels[i];
|
||||
this.api.ban(server, banee, channel);
|
||||
this.api.kick(server, banee, channel, reason +
|
||||
' (network-wide ban requested by ' + banner + ')');
|
||||
}, this);
|
||||
setTimeout(function() {
|
||||
i++; banChannel(channels);
|
||||
}, 1000);
|
||||
}.bind(this);
|
||||
banChannel(channels);
|
||||
|
||||
var notifyString = dbot.t('nbanned', {
|
||||
'banner': banner,
|
||||
|
@ -17,3 +17,7 @@ will be that all of the users which are currently marked as operators in the
|
||||
reporting channel will receive a PM telling them a user has been reported, by
|
||||
whom, in which channel and why. If there is an administrative channel for the
|
||||
reporting channel (e.g. ##channel), the report will be posted there as well.
|
||||
|
||||
#### ~notify [#channel] [message]
|
||||
Notify staff of a channel of a message. This can be run in either PM or in the
|
||||
channel. If notifyVoice is set, voiced users will also receive notifications.
|
||||
|
@ -43,9 +43,29 @@ var report = function(dbot) {
|
||||
} else {
|
||||
event.reply(dbot.t('not_in_channel', { 'channel': channelName }));
|
||||
}
|
||||
},
|
||||
|
||||
'~notify': function(event) {
|
||||
var channelName = event.input[1];
|
||||
var message = event.input[2];
|
||||
|
||||
if(_.has(event.allChannels, channelName)) {
|
||||
this.api.notify(event.server, channelName, dbot.t('notify', {
|
||||
'channel': channelName,
|
||||
'notifier': event.user,
|
||||
'message': message
|
||||
}));
|
||||
event.reply(dbot.t('notified', {
|
||||
'user': event.user,
|
||||
'channel': channelName
|
||||
}));
|
||||
} else {
|
||||
event.reply(dbot.t('not_in_channel', { 'channel': channelName }));
|
||||
}
|
||||
}
|
||||
};
|
||||
commands['~report'].regex = [/^~report ([^ ]+) ([^ ]+) (.+)$/, 4];
|
||||
commands['~notify'].regex = [/^~notify ([^ ]+) (.+)$/, 3];
|
||||
this.commands = commands;
|
||||
};
|
||||
|
||||
|
@ -26,5 +26,11 @@
|
||||
"cy": "Dydw i ddim yn bresennol yn {channel}.",
|
||||
"nl": "Ik ben niet aanwezig in {channel}.",
|
||||
"de": "Ich bin nicht in {channel} aktiv."
|
||||
},
|
||||
"notify": {
|
||||
"en": "Attention {channel}: {notifier}: {message}"
|
||||
},
|
||||
"notified": {
|
||||
"en": "{user}: {channel} staff notified."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user