3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 19:52:36 +01:00

add some including

This commit is contained in:
reality 2013-01-20 18:19:44 +00:00
parent f908db7b3b
commit 05e6d084b5
2 changed files with 12 additions and 3 deletions

View File

@ -7,11 +7,20 @@ var commands = function(dbot) {
alias = event.params[1].trim();
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', {
'user': alias,
'count': aliasCount
}));
}) + including);
} else if(_.has(knownUsers.aliases, alias)) {
event.reply(dbot.t('alias', {
'alias': alias,

View File

@ -3,7 +3,7 @@
"english": "{alias} is an alias of {user}"
},
"primary": {
"english": "{user} is a primary user with {count} aliases."
"english": "{user} is a primary user with {count} aliases, "
},
"unknown_alias": {
"english": "{alias} does not currently exist as an alias or known user."