mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-04 00:57:12 -08:00
Detect if a use is trying to place an invalid ban
This commit is contained in:
@@ -122,6 +122,25 @@ void BanDialog::okClicked()
|
||||
QMessageBox::critical(this, tr("Error"), tr("You have to select a name-based, IP-based, clientId based, or some combination of the three to place a ban."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (nameBanCheckBox->isChecked())
|
||||
if (nameBanEdit->text() == ""){
|
||||
QMessageBox::critical(this, tr("Error"), tr("You must have at value in the name ban when selecting the name ban checkbox."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ipBanCheckBox->isChecked())
|
||||
if (ipBanEdit->text() == ""){
|
||||
QMessageBox::critical(this, tr("Error"), tr("You must have at value in the ip ban when selecting the ip ban checkbox."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (idBanCheckBox->isChecked())
|
||||
if (idBanCheckBox->text() == ""){
|
||||
QMessageBox::critical(this, tr("Error"), tr("You must have at value in the clientid ban when selecting the clientid ban checkbox."));
|
||||
return;
|
||||
}
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user