diff --git a/src/gui/login/LoginModel.cpp b/src/gui/login/LoginModel.cpp index 6cc0c9c10..b14a69cc3 100644 --- a/src/gui/login/LoginModel.cpp +++ b/src/gui/login/LoginModel.cpp @@ -8,6 +8,13 @@ LoginModel::LoginModel(): void LoginModel::Login(string username, string password) { + if (username.find('@') != username.npos) + { + statusText = "Use your Powder Toy account to log in, not your email. If you don't have a Powder Toy account, you can create one at https://powdertoy.co.uk/Register.html"; + loginStatus = false; + notifyStatusChanged(); + return; + } statusText = "Logging in..."; loginStatus = false; notifyStatusChanged(); @@ -20,9 +27,6 @@ void LoginModel::Login(string username, string password) break; case LoginError: statusText = Client::Ref().GetLastError(); - size_t banStart = statusText.find(". Ban expire in"); //TODO: temporary, remove this when the ban message is fixed - if (banStart != statusText.npos) - statusText.replace(banStart, 15, ". Login at http://powdertoy.co.uk in order to see the full ban reason. Ban expires in"); break; } notifyStatusChanged(); diff --git a/src/gui/login/LoginView.cpp b/src/gui/login/LoginView.cpp index c9db04e3f..eca61dd2e 100644 --- a/src/gui/login/LoginView.cpp +++ b/src/gui/login/LoginView.cpp @@ -93,7 +93,7 @@ void LoginView::OnTryExit(ExitMethod method) void LoginView::NotifyStatusChanged(LoginModel * sender) { if (infoLabel->Visible) - targetSize.Y -= infoLabel->Size.Y+2; + targetSize.Y = 87; infoLabel->SetText(sender->GetStatusText()); infoLabel->AutoHeight(); if (sender->GetStatusText().length())