QTfrontend/hwform.cpp
changeset 9057 903f50e85144
parent 9033 b0ed8608303f
child 9063 5cab446e1341
--- a/QTfrontend/hwform.cpp	Mon May 27 10:52:30 2013 +0400
+++ b/QTfrontend/hwform.cpp	Mon May 27 10:47:59 2013 -0400
@@ -153,7 +153,7 @@
 
     config = new GameUIConfig(this, DataManager::instance().settingsFileName());
     frontendEffects = config->value("frontend/effects", true).toBool();
-    playerHash = QString(QCryptographicHash::hash(config->value("net/nick","").toString().toUtf8(), QCryptographicHash::Md5).toHex());
+    playerHash = QString(QCryptographicHash::hash(config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString().toUtf8(), QCryptographicHash::Md5).toHex());
 
     ui.pageRoomsList->setSettings(config);
     ui.pageNetGame->setSettings(config);
@@ -470,7 +470,7 @@
 
     if(teamslist.empty())
     {
-        QString currentNickName = config->value("net/nick","").toString().toUtf8();
+        QString currentNickName = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString().toUtf8();
         QString teamName;
 
         if (currentNickName.isEmpty())
@@ -1379,7 +1379,7 @@
     if (hwnet->m_private_game == false && AskForNickAndPwd() != 0)
         return;
 
-    QString nickname = config->value("net/nick", "").toString();
+    QString nickname = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString();
     ui.pageRoomsList->setUser(nickname);
     ui.pageNetGame->setUser(nickname);
 
@@ -1398,7 +1398,7 @@
     QString password;
 
     do {
-        nickname = config->value("net/nick", "").toString();
+        nickname = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString();
         hash = config->passwordHash();
         temphash = config->tempHash();