forked from GitHub/dbot
add some including
This commit is contained in:
parent
f908db7b3b
commit
05e6d084b5
@ -7,11 +7,20 @@ var commands = function(dbot) {
|
|||||||
alias = event.params[1].trim();
|
alias = event.params[1].trim();
|
||||||
|
|
||||||
if(_.include(knownUsers.users, alias)) {
|
if(_.include(knownUsers.users, alias)) {
|
||||||
var aliasCount = this.api.getAliases(event.server, alias).length;
|
var aliases = this.api.getAliases(event.server, alias);
|
||||||
|
var aliasCount = aliases.length;
|
||||||
|
|
||||||
|
var aliases = _.first(aliases, 10);
|
||||||
|
var including = 'including: ';
|
||||||
|
for(var i=0;i<aliases.length;i++) {
|
||||||
|
including += alises[i] + ', ';
|
||||||
|
}
|
||||||
|
including = including.slice(0, -2) + '.';
|
||||||
|
|
||||||
event.reply(dbot.t('primary', {
|
event.reply(dbot.t('primary', {
|
||||||
'user': alias,
|
'user': alias,
|
||||||
'count': aliasCount
|
'count': aliasCount
|
||||||
}));
|
}) + including);
|
||||||
} else if(_.has(knownUsers.aliases, alias)) {
|
} else if(_.has(knownUsers.aliases, alias)) {
|
||||||
event.reply(dbot.t('alias', {
|
event.reply(dbot.t('alias', {
|
||||||
'alias': alias,
|
'alias': alias,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"english": "{alias} is an alias of {user}"
|
"english": "{alias} is an alias of {user}"
|
||||||
},
|
},
|
||||||
"primary": {
|
"primary": {
|
||||||
"english": "{user} is a primary user with {count} aliases."
|
"english": "{user} is a primary user with {count} aliases, "
|
||||||
},
|
},
|
||||||
"unknown_alias": {
|
"unknown_alias": {
|
||||||
"english": "{alias} does not currently exist as an alias or known user."
|
"english": "{alias} does not currently exist as an alias or known user."
|
||||||
|
Loading…
Reference in New Issue
Block a user