3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

dont show including if no aliases

This commit is contained in:
reality 2013-01-20 18:26:07 +00:00
parent bf40369352
commit eb104f157b

View File

@ -10,6 +10,7 @@ var commands = function(dbot) {
var aliases = this.api.getAliases(event.server, alias);
var aliasCount = aliases.length;
if(aliasCount != 0) {
var aliases = _.first(aliases, 10);
var including = 'including: ';
for(var i=0;i<aliases.length;i++) {
@ -21,6 +22,12 @@ var commands = function(dbot) {
'user': alias,
'count': aliasCount
}) + including);
} else {
event.reply(dbot.t('primary', {
'user': alias,
'count': aliasCount
}));
}
} else if(_.has(knownUsers.aliases, alias)) {
event.reply(dbot.t('alias', {
'alias': alias,