Only connect to the server if not all whitespace

This commit is contained in:
Tristan B. Kildaire 2020-10-24 12:13:34 +02:00
parent 0a3b4acb14
commit 3ee0830b65
1 changed files with 9 additions and 4 deletions

View File

@ -143,9 +143,14 @@ public final class ConnectionAssistant : Assistant
string accountPassword = password.getBuffer().getText();
/* TODO: Check for emptiness */
if(cmp(serverAddress, "") == 0 || cmp(serverPort, "") == 0 || cmp(accountUsername, "") == 0 || cmp(accountPassword, "") == 0)
{
/* TODO: Handle error here */
}
else
{
/* Create a new Connection */
gui.connectServer(serverAddress, to!(ushort)(serverPort), [accountUsername, accountPassword]);
}
}
}