more spectator code

This commit is contained in:
Max-Wilhelm Bruker 2009-09-16 01:40:49 +02:00
parent cdfe0e0301
commit ab3858239f
13 changed files with 62 additions and 34 deletions

View file

@ -100,7 +100,6 @@ void Server::incomingConnection(int socketId)
ServerSocket *socket = new ServerSocket(this);
socket->setSocketDescriptor(socketId);
connect(socket, SIGNAL(createGame(const QString, const QString, int, bool, ServerSocket *)), this, SLOT(addGame(const QString, const QString, int, bool, ServerSocket *)));
connect(socket, SIGNAL(joinGame(int, bool, ServerSocket *)), this, SLOT(addClientToGame(int, bool, ServerSocket *)));
socket->initConnection();
players << socket;
}

View file

@ -822,8 +822,7 @@ void ServerSocket::msg(const QString &s)
void ServerSocket::initConnection()
{
msg(QString("welcome||%1").arg(VERSION_STRING));
msg("welcome||.");
msg(QString("welcome|%1|%2").arg(PROTOCOL_VERSION).arg(VERSION_STRING));
}
void ServerSocket::catchSocketError(QAbstractSocket::SocketError socketError)

View file

@ -18,4 +18,5 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
const char *VERSION_STRING = "Servatrice 0.20090828";
int PROTOCOL_VERSION = 1;
const char *VERSION_STRING = "Servatrice 0.20090915";