forked from GitHub/dbot
add hackish handling of non-existent users
This commit is contained in:
parent
3cdf3fd417
commit
9d277c7ac6
@ -16,7 +16,11 @@ var finger = function(dbot) {
|
||||
stdout = stdout.substring(name);
|
||||
ret = stdout.search("Dir");
|
||||
stdout = stdout.substring(6,ret);
|
||||
event.reply(dbot.t("name",{user: username, name: stdout}));
|
||||
if (stdout == "Welcom") {
|
||||
event.reply(dbot.t("nonexistent",{user: username}));
|
||||
} else {
|
||||
event.reply(dbot.t("name",{user: username, name: stdout}));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,8 @@
|
||||
{
|
||||
"name": {
|
||||
"en": "{user} is {name}."
|
||||
},
|
||||
"nonexistent": {
|
||||
"en": "{user} not found."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user