3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 20:22:39 +01:00

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); stdout = stdout.substring(name);
ret = stdout.search("Dir"); ret = stdout.search("Dir");
stdout = stdout.substring(6,ret); 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})); event.reply(dbot.t("name",{user: username, name: stdout}));
}
}); });
} }
}; };

View File

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