forked from GitHub/dbot
useful error message when attempting to log in with server what dont exist innit
This commit is contained in:
parent
54a0a96cbc
commit
d0ac927b92
@ -42,6 +42,9 @@ var webInterface = function(dbot) {
|
||||
if(!server || !username) return callback(null, false, { 'message':
|
||||
'Please provide a username in the format of name@server (Servers: ' +
|
||||
_.keys(dbot.config.servers).join(', ') + ')' });
|
||||
if(!_.has(dbot.config.servers, server)) return callback(null, false, { 'message':
|
||||
'Please provide a valid server (Servers: ' +
|
||||
_.keys(dbot.config.servers).join(', ') + ')' });
|
||||
|
||||
dbot.api.users.resolveUser(server, username, function(user) {
|
||||
if(user) {
|
||||
|
Loading…
Reference in New Issue
Block a user