- Fix join/leave messages color
- Add a check to prevent local schemes from overriding with bad ones
--- a/QTfrontend/chatwidget.cpp Thu Sep 10 18:50:53 2009 +0000
+++ b/QTfrontend/chatwidget.cpp Sun Sep 13 17:51:25 2009 +0000
@@ -79,7 +79,7 @@
chatStrings.removeFirst();
QString formattedStr = Qt::escape(str);
- if (formattedStr.startsWith("***"))
+ if (formattedStr.startsWith("["))
formattedStr = QString("<font color=grey>%1</font>").arg(formattedStr);
chatStrings.append(formattedStr);
--- a/QTfrontend/gamecfgwidget.cpp Thu Sep 10 18:50:53 2009 +0000
+++ b/QTfrontend/gamecfgwidget.cpp Sun Sep 13 17:51:25 2009 +0000
@@ -144,11 +144,12 @@
void GameCFGWidget::setNetAmmo(const QString& name, const QString& ammo)
{
- if (ammo.size() != cDefaultAmmoStore->size())
+ bool illegal = ammo.size() != cDefaultAmmoStore->size();
+ if (illegal)
QMessageBox::critical(this, tr("Error"), tr("Illegal ammo scheme"));
int pos = WeaponsName->findText(name);
- if (pos == -1) {
+ if ((pos == -1) || illegal) { // prevent from overriding schemes with bad ones
WeaponsName->addItem(name, ammo);
WeaponsName->setCurrentIndex(WeaponsName->count() - 1);
} else {