mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 04:02:39 +01:00
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