# HG changeset patch
# User unc0rr
# Date 1252864285 0
# Node ID 603965eca22bfc5dc05496d0fd4e31fc7b201ef9
# Parent  d62b1f2249826ddcfd0f1480e4c033952b5b720a
 - Fix join/leave messages color
 - Add a check to prevent local schemes from overriding with bad ones

diff -r d62b1f224982 -r 603965eca22b QTfrontend/chatwidget.cpp
--- 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);
diff -r d62b1f224982 -r 603965eca22b QTfrontend/gamecfgwidget.cpp
--- 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 {