add hackish handling of non-existent users

This commit is contained in:
Douglas Gardner 2013-03-06 13:20:58 +00:00
parent 3cdf3fd417
commit 9d277c7ac6
2 changed files with 8 additions and 1 deletions

View File

@ -16,7 +16,11 @@ var finger = function(dbot) {
stdout = stdout.substring(name);
ret = stdout.search("Dir");
stdout = stdout.substring(6,ret);
if (stdout == "Welcom") {
event.reply(dbot.t("nonexistent",{user: username}));
} else {
event.reply(dbot.t("name",{user: username, name: stdout}));
}
});
}
};

View File

@ -1,5 +1,8 @@
{
"name": {
"en": "{user} is {name}."
},
"nonexistent": {
"en": "{user} not found."
}
}