|
@@ -17,7 +17,7 @@ InformationServer::InformationServer( InitDatei *zIni )
|
|
empfangen = 0;
|
|
empfangen = 0;
|
|
gesendet = 0;
|
|
gesendet = 0;
|
|
fehler = new Text();
|
|
fehler = new Text();
|
|
- ini = zIni->getThis();
|
|
|
|
|
|
+ ini = dynamic_cast<InitDatei *>( zIni->getThis() );
|
|
id = *zIni->zWert( "ServerId" );
|
|
id = *zIni->zWert( "ServerId" );
|
|
server = new Server();
|
|
server = new Server();
|
|
aServer = new SSLServer();
|
|
aServer = new SSLServer();
|
|
@@ -66,13 +66,13 @@ void InformationServer::runn()
|
|
if( end && klient )
|
|
if( end && klient )
|
|
{
|
|
{
|
|
klient->trenne();
|
|
klient->trenne();
|
|
- klient = klient->release();
|
|
|
|
|
|
+ klient = (SSLSKlient *)klient->release();
|
|
Sleep( 1000 );
|
|
Sleep( 1000 );
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if( !klient )
|
|
if( !klient )
|
|
continue;
|
|
continue;
|
|
- ISAKlient * clHandle = new ISAKlient( klient, (InformationServer *)getThis() );
|
|
|
|
|
|
+ ISAKlient *clHandle = new ISAKlient( klient, dynamic_cast<InformationServer *>( getThis() ) );
|
|
clHandle->start();
|
|
clHandle->start();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -86,7 +86,7 @@ void InformationServer::thread()
|
|
if( !klient )
|
|
if( !klient )
|
|
continue;
|
|
continue;
|
|
Framework::getThreadRegister()->cleanUpClosedThreads();
|
|
Framework::getThreadRegister()->cleanUpClosedThreads();
|
|
- ISKlient * clHandle = new ISKlient( klient, (InformationServer *)getThis() );
|
|
|
|
|
|
+ ISKlient *clHandle = new ISKlient( klient, dynamic_cast<InformationServer *>( getThis() ) );
|
|
EnterCriticalSection( &cs );
|
|
EnterCriticalSection( &cs );
|
|
klients->set( clHandle, klientAnzahl );
|
|
klients->set( clHandle, klientAnzahl );
|
|
klientAnzahl++;
|
|
klientAnzahl++;
|
|
@@ -105,13 +105,13 @@ void InformationServer::close()
|
|
EnterCriticalSection( &cs );
|
|
EnterCriticalSection( &cs );
|
|
for( int i = 0; i < klientAnzahl; i++ )
|
|
for( int i = 0; i < klientAnzahl; i++ )
|
|
klients->z( i )->absturz();
|
|
klients->z( i )->absturz();
|
|
- klients = klients->release();
|
|
|
|
|
|
+ klients = ( RCArray<ISKlient>* )klients->release();
|
|
klientAnzahl = 0;
|
|
klientAnzahl = 0;
|
|
LeaveCriticalSection( &cs );
|
|
LeaveCriticalSection( &cs );
|
|
ende();
|
|
ende();
|
|
run = 0;
|
|
run = 0;
|
|
end = 1;
|
|
end = 1;
|
|
- Klient * klient = new Klient();
|
|
|
|
|
|
+ Klient *klient = new Klient();
|
|
klient->verbinde( aServer->getPort(), "127.0.0.1" );
|
|
klient->verbinde( aServer->getPort(), "127.0.0.1" );
|
|
Sleep( 500 );
|
|
Sleep( 500 );
|
|
aServer->trenne();
|
|
aServer->trenne();
|
|
@@ -224,7 +224,7 @@ bool InformationServer::absturzKlient( int klientId )
|
|
return gefunden;
|
|
return gefunden;
|
|
}
|
|
}
|
|
|
|
|
|
-bool InformationServer::removeKlient( ISKlient * zKlient )
|
|
|
|
|
|
+bool InformationServer::removeKlient( ISKlient *zKlient )
|
|
{
|
|
{
|
|
bool gefunden = 0;
|
|
bool gefunden = 0;
|
|
EnterCriticalSection( &cs );
|
|
EnterCriticalSection( &cs );
|
|
@@ -286,7 +286,7 @@ char *InformationServer::getLetzterFehler() const
|
|
|
|
|
|
// Inhalt der ISAKlient Klasse aus InformationServer.h
|
|
// Inhalt der ISAKlient Klasse aus InformationServer.h
|
|
// Konstruktor
|
|
// Konstruktor
|
|
-ISAKlient::ISAKlient( SSLSKlient * klient, InformationServer * is )
|
|
|
|
|
|
+ISAKlient::ISAKlient( SSLSKlient *klient, InformationServer *is )
|
|
: Thread()
|
|
: Thread()
|
|
{
|
|
{
|
|
this->klient = klient;
|
|
this->klient = klient;
|
|
@@ -324,13 +324,13 @@ void ISAKlient::thread()
|
|
{
|
|
{
|
|
klient->sende( "\1", 1 );
|
|
klient->sende( "\1", 1 );
|
|
unsigned char nLen = 0;
|
|
unsigned char nLen = 0;
|
|
- klient->getNachricht( (char *)& nLen, 1 );
|
|
|
|
|
|
+ klient->getNachricht( (char *)&nLen, 1 );
|
|
char *n = new char[ nLen + 1 ];
|
|
char *n = new char[ nLen + 1 ];
|
|
n[ (int)nLen ] = 0;
|
|
n[ (int)nLen ] = 0;
|
|
if( nLen )
|
|
if( nLen )
|
|
klient->getNachricht( n, nLen );
|
|
klient->getNachricht( n, nLen );
|
|
unsigned char pLen = 0;
|
|
unsigned char pLen = 0;
|
|
- klient->getNachricht( (char *)& pLen, 1 );
|
|
|
|
|
|
+ klient->getNachricht( (char *)&pLen, 1 );
|
|
char *p = new char[ pLen + 1 ];
|
|
char *p = new char[ pLen + 1 ];
|
|
p[ (int)pLen ] = 0;
|
|
p[ (int)pLen ] = 0;
|
|
if( pLen )
|
|
if( pLen )
|
|
@@ -426,7 +426,7 @@ void ISAKlient::thread()
|
|
}
|
|
}
|
|
else
|
|
else
|
|
ok = 1;
|
|
ok = 1;
|
|
- if( ok &&is->hatClients() )
|
|
|
|
|
|
+ if( ok && is->hatClients() )
|
|
{
|
|
{
|
|
errorZuKlient( "Es sind noch Klients Online. Bitte versuche es später erneut." );
|
|
errorZuKlient( "Es sind noch Klients Online. Bitte versuche es später erneut." );
|
|
break;
|
|
break;
|
|
@@ -522,7 +522,7 @@ void ISAKlient::thread()
|
|
{
|
|
{
|
|
klient->sende( "\1", 1 );
|
|
klient->sende( "\1", 1 );
|
|
int maxC = 0;
|
|
int maxC = 0;
|
|
- klient->getNachricht( (char *)& maxC, 4 );
|
|
|
|
|
|
+ klient->getNachricht( (char *)&maxC, 4 );
|
|
if( is->zDB()->adminHatRecht( adminId, Admin_Recht::ISMCChange ) )
|
|
if( is->zDB()->adminHatRecht( adminId, Admin_Recht::ISMCChange ) )
|
|
{
|
|
{
|
|
if( is->setMaxKlients( maxC ) )
|
|
if( is->setMaxKlients( maxC ) )
|
|
@@ -544,8 +544,8 @@ void ISAKlient::thread()
|
|
{
|
|
{
|
|
klient->sende( "\1", 1 );
|
|
klient->sende( "\1", 1 );
|
|
int klientId = 0;
|
|
int klientId = 0;
|
|
- klient->getNachricht( (char *)& klientId, 4 );
|
|
|
|
- if( klientId &&is->absturzKlient( klientId ) )
|
|
|
|
|
|
+ klient->getNachricht( (char *)&klientId, 4 );
|
|
|
|
+ if( klientId && is->absturzKlient( klientId ) )
|
|
klient->sende( "\1", 1 );
|
|
klient->sende( "\1", 1 );
|
|
else
|
|
else
|
|
klient->sende( "\0", 1 );
|
|
klient->sende( "\0", 1 );
|
|
@@ -577,7 +577,7 @@ void ISAKlient::errorZuKlient( const char *nachricht ) const // sendet eine Fehl
|
|
|
|
|
|
// Inhalt der ISKlient aus InformationServer.h
|
|
// Inhalt der ISKlient aus InformationServer.h
|
|
// Konstruktor
|
|
// Konstruktor
|
|
-ISKlient::ISKlient( SKlient * klient, InformationServer * is )
|
|
|
|
|
|
+ISKlient::ISKlient( SKlient *klient, InformationServer *is )
|
|
: Thread()
|
|
: Thread()
|
|
{
|
|
{
|
|
this->klient = klient;
|
|
this->klient = klient;
|
|
@@ -616,7 +616,7 @@ void ISKlient::thread()
|
|
switch( c )
|
|
switch( c )
|
|
{
|
|
{
|
|
case 1: // Klient identifikation
|
|
case 1: // Klient identifikation
|
|
- klient->getNachrichtEncrypted( (char *)& klientNummer, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&klientNummer, 4 );
|
|
if( !is->zDB()->proveKlient( klientNummer, is->getId() ) )
|
|
if( !is->zDB()->proveKlient( klientNummer, is->getId() ) )
|
|
{
|
|
{
|
|
klientNummer = 0;
|
|
klientNummer = 0;
|
|
@@ -647,8 +647,8 @@ void ISKlient::thread()
|
|
if( 1 )
|
|
if( 1 )
|
|
{
|
|
{
|
|
int klientId = 0;
|
|
int klientId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& klientId, 4 );
|
|
|
|
- if( klientId &&is->absturzKlient( klientId ) )
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&klientId, 4 );
|
|
|
|
+ if( klientId && is->absturzKlient( klientId ) )
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
else
|
|
else
|
|
klient->sendeEncrypted( "\0", 1 );
|
|
klient->sendeEncrypted( "\0", 1 );
|
|
@@ -685,7 +685,7 @@ void ISKlient::thread()
|
|
char typ = 0;
|
|
char typ = 0;
|
|
Text *info = is->zDB()->getInformationsText( &typ );
|
|
Text *info = is->zDB()->getInformationsText( &typ );
|
|
unsigned short len = info ? (unsigned short)info->getLength() : (unsigned short)0;
|
|
unsigned short len = info ? (unsigned short)info->getLength() : (unsigned short)0;
|
|
- klient->sendeEncrypted( (char *)& len, 2 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&len, 2 );
|
|
if( len > 0 )
|
|
if( len > 0 )
|
|
klient->sendeEncrypted( info->getText(), len );
|
|
klient->sendeEncrypted( info->getText(), len );
|
|
klient->sendeEncrypted( &typ, 1 );
|
|
klient->sendeEncrypted( &typ, 1 );
|
|
@@ -703,7 +703,7 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int spielId = 0;
|
|
int spielId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
if( is->zDB()->istSpielErlaubt( spielId ) )
|
|
if( is->zDB()->istSpielErlaubt( spielId ) )
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
else
|
|
else
|
|
@@ -720,7 +720,7 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int karteId = 0;
|
|
int karteId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
if( is->zDB()->istKarteErlaubt( karteId ) )
|
|
if( is->zDB()->istKarteErlaubt( karteId ) )
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
else
|
|
else
|
|
@@ -737,12 +737,12 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
unsigned char len = 0;
|
|
unsigned char len = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
char *name = new char[ len + 1 ];
|
|
char *name = new char[ len + 1 ];
|
|
name[ (int)len ] = 0;
|
|
name[ (int)len ] = 0;
|
|
klient->getNachrichtEncrypted( name, len );
|
|
klient->getNachrichtEncrypted( name, len );
|
|
int id = is->zDB()->getSpielId( name );
|
|
int id = is->zDB()->getSpielId( name );
|
|
- klient->sendeEncrypted( (char *)& id, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&id, 4 );
|
|
delete[] name;
|
|
delete[] name;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
@@ -756,12 +756,12 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
unsigned char len = 0;
|
|
unsigned char len = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
char *name = new char[ len + 1 ];
|
|
char *name = new char[ len + 1 ];
|
|
name[ (int)len ] = 0;
|
|
name[ (int)len ] = 0;
|
|
klient->getNachrichtEncrypted( name, len );
|
|
klient->getNachrichtEncrypted( name, len );
|
|
int id = is->zDB()->getKarteId( name );
|
|
int id = is->zDB()->getKarteId( name );
|
|
- klient->sendeEncrypted( (char *)& id, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&id, 4 );
|
|
delete[] name;
|
|
delete[] name;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
@@ -775,7 +775,7 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int accountId = 0;
|
|
int accountId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& accountId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&accountId, 4 );
|
|
Text *rName = is->zDB()->getAccountRufName( accountId );
|
|
Text *rName = is->zDB()->getAccountRufName( accountId );
|
|
if( rName )
|
|
if( rName )
|
|
{
|
|
{
|
|
@@ -799,13 +799,13 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int accountId = 0;
|
|
int accountId = 0;
|
|
int spielId = 0;
|
|
int spielId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& accountId, 4 );
|
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&accountId, 4 );
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
Array< int > *values = is->zDB()->getAccountSpielStatistik( accountId, spielId );
|
|
Array< int > *values = is->zDB()->getAccountSpielStatistik( accountId, spielId );
|
|
for( int i = 0; i < 10; i++ )
|
|
for( int i = 0; i < 10; i++ )
|
|
{
|
|
{
|
|
int tmp = values ? values->get( i ) : 0;
|
|
int tmp = values ? values->get( i ) : 0;
|
|
- klient->sendeEncrypted( (char *)& tmp, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&tmp, 4 );
|
|
}
|
|
}
|
|
if( values )
|
|
if( values )
|
|
values->release();
|
|
values->release();
|
|
@@ -821,12 +821,12 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
unsigned char len = 0;
|
|
unsigned char len = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
char *suche = new char[ len + 1 ];
|
|
char *suche = new char[ len + 1 ];
|
|
suche[ (int)len ] = 0;
|
|
suche[ (int)len ] = 0;
|
|
klient->getNachrichtEncrypted( suche, len );
|
|
klient->getNachrichtEncrypted( suche, len );
|
|
int seite = 0;
|
|
int seite = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& seite, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&seite, 4 );
|
|
char sortSpalte = 0;
|
|
char sortSpalte = 0;
|
|
char backwords = 0;
|
|
char backwords = 0;
|
|
klient->getNachrichtEncrypted( &sortSpalte, 1 );
|
|
klient->getNachrichtEncrypted( &sortSpalte, 1 );
|
|
@@ -834,27 +834,27 @@ void ISKlient::thread()
|
|
int maxSeite = 0;
|
|
int maxSeite = 0;
|
|
Result list = is->zDB()->getSpielerListe( suche, &seite, &maxSeite, sortSpalte, backwords != 0 );
|
|
Result list = is->zDB()->getSpielerListe( suche, &seite, &maxSeite, sortSpalte, backwords != 0 );
|
|
delete[] suche;
|
|
delete[] suche;
|
|
- klient->sendeEncrypted( (char *)& seite, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& maxSeite, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& list.zeilenAnzahl, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&seite, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&maxSeite, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&list.zeilenAnzahl, 4 );
|
|
for( int i = 0; i < list.zeilenAnzahl; i++ )
|
|
for( int i = 0; i < list.zeilenAnzahl; i++ )
|
|
{
|
|
{
|
|
int accId = list.values[ i * 6 ];
|
|
int accId = list.values[ i * 6 ];
|
|
- klient->sendeEncrypted( (char *)& accId, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&accId, 4 );
|
|
len = (char)list.values[ i * 6 + 1 ].getLength();
|
|
len = (char)list.values[ i * 6 + 1 ].getLength();
|
|
- klient->sendeEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&len, 1 );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 1 ], len );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 1 ], len );
|
|
len = (char)list.values[ i * 6 + 2 ].getLength();
|
|
len = (char)list.values[ i * 6 + 2 ].getLength();
|
|
- klient->sendeEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&len, 1 );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 2 ], len );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 2 ], len );
|
|
len = (char)list.values[ i * 6 + 3 ].getLength();
|
|
len = (char)list.values[ i * 6 + 3 ].getLength();
|
|
- klient->sendeEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&len, 1 );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 3 ], len );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 3 ], len );
|
|
len = (char)list.values[ i * 6 + 4 ].getLength();
|
|
len = (char)list.values[ i * 6 + 4 ].getLength();
|
|
- klient->sendeEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&len, 1 );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 4 ], len );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 4 ], len );
|
|
len = (char)list.values[ i * 6 + 5 ].getLength();
|
|
len = (char)list.values[ i * 6 + 5 ].getLength();
|
|
- klient->sendeEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&len, 1 );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 5 ], len );
|
|
klient->sendeEncrypted( list.values[ i * 6 + 5 ], len );
|
|
}
|
|
}
|
|
list.destroy();
|
|
list.destroy();
|
|
@@ -870,9 +870,9 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int gruppeId = 0;
|
|
int gruppeId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& gruppeId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&gruppeId, 4 );
|
|
int karteId = is->zDB()->getGruppenKarteId( gruppeId );
|
|
int karteId = is->zDB()->getGruppenKarteId( gruppeId );
|
|
- klient->sendeEncrypted( (char *)& karteId, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&karteId, 4 );
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 0xE: // Frage nach Karten Name
|
|
case 0xE: // Frage nach Karten Name
|
|
@@ -885,7 +885,7 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int karteId = 0;
|
|
int karteId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
Text *name = is->zDB()->getKarteName( karteId );
|
|
Text *name = is->zDB()->getKarteName( karteId );
|
|
if( !name )
|
|
if( !name )
|
|
{
|
|
{
|
|
@@ -908,7 +908,7 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int spielId = 0;
|
|
int spielId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
Text *name = is->zDB()->getSpielName( spielId );
|
|
Text *name = is->zDB()->getSpielName( spielId );
|
|
if( !name )
|
|
if( !name )
|
|
{
|
|
{
|
|
@@ -931,7 +931,7 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int chatroomId = 0;
|
|
int chatroomId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& chatroomId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&chatroomId, 4 );
|
|
Text *name = is->zDB()->getChatroomName( chatroomId );
|
|
Text *name = is->zDB()->getChatroomName( chatroomId );
|
|
if( !name )
|
|
if( !name )
|
|
{
|
|
{
|
|
@@ -954,9 +954,9 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int karteId = 0;
|
|
int karteId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
int spielId = is->zDB()->getSpielId( karteId );
|
|
int spielId = is->zDB()->getSpielId( karteId );
|
|
- klient->sendeEncrypted( (char *)& spielId, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&spielId, 4 );
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 0x12: // Frage nach Spieler Id
|
|
case 0x12: // Frage nach Spieler Id
|
|
@@ -969,14 +969,14 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
unsigned char len = 0;
|
|
unsigned char len = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
if( len )
|
|
if( len )
|
|
{
|
|
{
|
|
char *name = new char[ len + 1 ];
|
|
char *name = new char[ len + 1 ];
|
|
name[ (int)len ] = 0;
|
|
name[ (int)len ] = 0;
|
|
klient->getNachrichtEncrypted( name, len );
|
|
klient->getNachrichtEncrypted( name, len );
|
|
int id = is->zDB()->getAccountId( name );
|
|
int id = is->zDB()->getAccountId( name );
|
|
- klient->sendeEncrypted( (char *)& id, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&id, 4 );
|
|
delete[]name;
|
|
delete[]name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -991,14 +991,14 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
unsigned char len = 0;
|
|
unsigned char len = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
if( len )
|
|
if( len )
|
|
{
|
|
{
|
|
char *name = new char[ len + 1 ];
|
|
char *name = new char[ len + 1 ];
|
|
name[ (int)len ] = 0;
|
|
name[ (int)len ] = 0;
|
|
klient->getNachrichtEncrypted( name, len );
|
|
klient->getNachrichtEncrypted( name, len );
|
|
int id = is->zDB()->getChatroomId( name );
|
|
int id = is->zDB()->getChatroomId( name );
|
|
- klient->sendeEncrypted( (char *)& id, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&id, 4 );
|
|
delete[]name;
|
|
delete[]name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1014,10 +1014,10 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int spielId = 0;
|
|
int spielId = 0;
|
|
int accountId = 0;
|
|
int accountId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
|
- klient->getNachrichtEncrypted( (char *)& accountId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&accountId, 4 );
|
|
int ret = is->zDB()->getSpielerPunkte( spielId, accountId );
|
|
int ret = is->zDB()->getSpielerPunkte( spielId, accountId );
|
|
- klient->sendeEncrypted( (char *)& ret, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&ret, 4 );
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 0x15: // Frage nach Gruppe Administrator
|
|
case 0x15: // Frage nach Gruppe Administrator
|
|
@@ -1030,9 +1030,9 @@ void ISKlient::thread()
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int gruppeId = 0;
|
|
int gruppeId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& gruppeId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&gruppeId, 4 );
|
|
int ret = is->zDB()->getGruppeAdminId( gruppeId );
|
|
int ret = is->zDB()->getGruppeAdminId( gruppeId );
|
|
- klient->sendeEncrypted( (char *)& ret, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&ret, 4 );
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 0x16: // Frage nach Spiel Liste
|
|
case 0x16: // Frage nach Spiel Liste
|
|
@@ -1046,11 +1046,11 @@ void ISKlient::thread()
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
int anz = list->getEintragAnzahl();
|
|
int anz = list->getEintragAnzahl();
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
for( int i = 0; i < anz; i++ )
|
|
for( int i = 0; i < anz; i++ )
|
|
{
|
|
{
|
|
int id = list->get( i );
|
|
int id = list->get( i );
|
|
- klient->sendeEncrypted( (char *)& id, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&id, 4 );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -1061,9 +1061,9 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int id = 0;
|
|
int id = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& id, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&id, 4 );
|
|
int v = is->zDB()->getNeusteSpielVersion( id );
|
|
int v = is->zDB()->getNeusteSpielVersion( id );
|
|
- klient->sendeEncrypted( (char *)& v, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&v, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1073,7 +1073,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int k = is->zDB()->getKupfer( klientNummer );
|
|
int k = is->zDB()->getKupfer( klientNummer );
|
|
- klient->sendeEncrypted( (char *)& k, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&k, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1083,9 +1083,9 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int spielId = 0;
|
|
int spielId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
int dgId = is->zDB()->getDateiGruppeVonSpiel( spielId );
|
|
int dgId = is->zDB()->getDateiGruppeVonSpiel( spielId );
|
|
- klient->sendeEncrypted( (char *)& dgId, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&dgId, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1095,7 +1095,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int dgId = 0;
|
|
int dgId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& dgId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&dgId, 4 );
|
|
Text *pf = is->zDB()->getDateiGruppePfad( dgId );
|
|
Text *pf = is->zDB()->getDateiGruppePfad( dgId );
|
|
if( !pf )
|
|
if( !pf )
|
|
errorZuKlient( "Die Dateigruppe wurde nicht gefunden." );
|
|
errorZuKlient( "Die Dateigruppe wurde nicht gefunden." );
|
|
@@ -1117,7 +1117,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int spielId = 0;
|
|
int spielId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
Array< int > *list = is->zDB()->getAccountKarteListe( klientNummer, spielId );
|
|
Array< int > *list = is->zDB()->getAccountKarteListe( klientNummer, spielId );
|
|
if( !list )
|
|
if( !list )
|
|
{
|
|
{
|
|
@@ -1125,11 +1125,11 @@ void ISKlient::thread()
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
int anz = list->getEintragAnzahl();
|
|
int anz = list->getEintragAnzahl();
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
for( int i = 0; i < anz; i++ )
|
|
for( int i = 0; i < anz; i++ )
|
|
{
|
|
{
|
|
int id = list->get( i );
|
|
int id = list->get( i );
|
|
- klient->sendeEncrypted( (char *)& id, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&id, 4 );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -1140,7 +1140,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int gruppeId = 0;
|
|
int gruppeId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& gruppeId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&gruppeId, 4 );
|
|
char gSH = (char)is->zDB()->getGruppeSpielerAdd( gruppeId );
|
|
char gSH = (char)is->zDB()->getGruppeSpielerAdd( gruppeId );
|
|
klient->sendeEncrypted( &gSH, 1 );
|
|
klient->sendeEncrypted( &gSH, 1 );
|
|
}
|
|
}
|
|
@@ -1152,7 +1152,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
RCArray< Text > *datum = new RCArray< Text >();
|
|
RCArray< Text > *datum = new RCArray< Text >();
|
|
Array< double > *stOnline = new Array< double >();
|
|
Array< double > *stOnline = new Array< double >();
|
|
Array< double > *stSpiel = new Array< double >();
|
|
Array< double > *stSpiel = new Array< double >();
|
|
@@ -1172,13 +1172,13 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( datum->z( i )->getText(), len );
|
|
klient->sendeEncrypted( datum->z( i )->getText(), len );
|
|
double sto = stOnline->hat( i ) ? stOnline->get( i ) : 0;
|
|
double sto = stOnline->hat( i ) ? stOnline->get( i ) : 0;
|
|
- klient->sendeEncrypted( (char *)& sto, 8 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&sto, 8 );
|
|
double sts = stSpiel->hat( i ) ? stSpiel->get( i ) : 0;
|
|
double sts = stSpiel->hat( i ) ? stSpiel->get( i ) : 0;
|
|
- klient->sendeEncrypted( (char *)& sts, 8 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&sts, 8 );
|
|
int anzs = anzSpiele->hat( i ) ? anzSpiele->get( i ) : 0;
|
|
int anzs = anzSpiele->hat( i ) ? anzSpiele->get( i ) : 0;
|
|
- klient->sendeEncrypted( (char *)& anzs, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anzs, 4 );
|
|
int anzg = anzGewonnen->hat( i ) ? anzGewonnen->get( i ) : 0;
|
|
int anzg = anzGewonnen->hat( i ) ? anzGewonnen->get( i ) : 0;
|
|
- klient->sendeEncrypted( (char *)& anzg, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anzg, 4 );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1201,10 +1201,10 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
int karte = 0;
|
|
int karte = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
- klient->getNachrichtEncrypted( (char *)& karte, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karte, 4 );
|
|
int anz = is->zDB()->getAccountKarteSpiele( acc, karte );
|
|
int anz = is->zDB()->getAccountKarteSpiele( acc, karte );
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1215,10 +1215,10 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
int karte = 0;
|
|
int karte = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
- klient->getNachrichtEncrypted( (char *)& karte, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karte, 4 );
|
|
int anz = is->zDB()->getAccountKarteSpieleGewonnen( acc, karte );
|
|
int anz = is->zDB()->getAccountKarteSpieleGewonnen( acc, karte );
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1229,8 +1229,8 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
int karte = 0;
|
|
int karte = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
- klient->getNachrichtEncrypted( (char *)& karte, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karte, 4 );
|
|
char status = (char)is->zDB()->hatAccountKarte( acc, karte );
|
|
char status = (char)is->zDB()->hatAccountKarte( acc, karte );
|
|
klient->sendeEncrypted( &status, 1 );
|
|
klient->sendeEncrypted( &status, 1 );
|
|
}
|
|
}
|
|
@@ -1243,8 +1243,8 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
int spiel = 0;
|
|
int spiel = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
- klient->getNachrichtEncrypted( (char *)& spiel, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spiel, 4 );
|
|
char status = (char)is->zDB()->hatAccountSpiel( acc, spiel );
|
|
char status = (char)is->zDB()->hatAccountSpiel( acc, spiel );
|
|
klient->sendeEncrypted( &status, 1 );
|
|
klient->sendeEncrypted( &status, 1 );
|
|
}
|
|
}
|
|
@@ -1257,17 +1257,17 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
int spiel = 0;
|
|
int spiel = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
- klient->getNachrichtEncrypted( (char *)& spiel, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spiel, 4 );
|
|
Array< int > *res = is->zDB()->getAccountKarteGespieltListe( acc, spiel );
|
|
Array< int > *res = is->zDB()->getAccountKarteGespieltListe( acc, spiel );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
int anz = res->getEintragAnzahl();
|
|
int anz = res->getEintragAnzahl();
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
for( int i = 0; i < anz; i++ )
|
|
for( int i = 0; i < anz; i++ )
|
|
{
|
|
{
|
|
int val = res->get( i );
|
|
int val = res->get( i );
|
|
- klient->sendeEncrypted( (char *)& val, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&val, 4 );
|
|
}
|
|
}
|
|
res->release();
|
|
res->release();
|
|
}
|
|
}
|
|
@@ -1282,16 +1282,16 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
Array< int > *res = is->zDB()->getAccountSpielGespieltListe( acc );
|
|
Array< int > *res = is->zDB()->getAccountSpielGespieltListe( acc );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
int anz = res->getEintragAnzahl();
|
|
int anz = res->getEintragAnzahl();
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
for( int i = 0; i < anz; i++ )
|
|
for( int i = 0; i < anz; i++ )
|
|
{
|
|
{
|
|
int val = res->get( i );
|
|
int val = res->get( i );
|
|
- klient->sendeEncrypted( (char *)& val, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&val, 4 );
|
|
}
|
|
}
|
|
res->release();
|
|
res->release();
|
|
}
|
|
}
|
|
@@ -1306,17 +1306,17 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
Result res = is->zDB()->getSpielPartnerListe( acc );
|
|
Result res = is->zDB()->getSpielPartnerListe( acc );
|
|
- klient->sendeEncrypted( (char *)& res.zeilenAnzahl, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&res.zeilenAnzahl, 4 );
|
|
for( int i = 0; i < res.zeilenAnzahl; i++ )
|
|
for( int i = 0; i < res.zeilenAnzahl; i++ )
|
|
{
|
|
{
|
|
int spieler = res.values[ i * 3 ];
|
|
int spieler = res.values[ i * 3 ];
|
|
int anzahl = res.values[ i * 3 + 1 ];
|
|
int anzahl = res.values[ i * 3 + 1 ];
|
|
int karte = res.values[ i * 3 + 2 ];
|
|
int karte = res.values[ i * 3 + 2 ];
|
|
- klient->sendeEncrypted( (char *)& spieler, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& karte, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& anzahl, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&spieler, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&karte, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&anzahl, 4 );
|
|
}
|
|
}
|
|
res.destroy();
|
|
res.destroy();
|
|
}
|
|
}
|
|
@@ -1328,19 +1328,19 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
int seite = 0;
|
|
int seite = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& seite, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&seite, 4 );
|
|
char sortSpalte = 0;
|
|
char sortSpalte = 0;
|
|
char backwords = 0;
|
|
char backwords = 0;
|
|
klient->getNachrichtEncrypted( &sortSpalte, 1 );
|
|
klient->getNachrichtEncrypted( &sortSpalte, 1 );
|
|
klient->getNachrichtEncrypted( &backwords, 1 );
|
|
klient->getNachrichtEncrypted( &backwords, 1 );
|
|
int maxSeite = 0;
|
|
int maxSeite = 0;
|
|
Result list = is->zDB()->getSpielStatistikListe( acc, &seite, &maxSeite, sortSpalte, backwords != 0 );
|
|
Result list = is->zDB()->getSpielStatistikListe( acc, &seite, &maxSeite, sortSpalte, backwords != 0 );
|
|
- klient->sendeEncrypted( (char *)& seite, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& maxSeite, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& list.zeilenAnzahl, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& list.feldAnzahl, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&seite, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&maxSeite, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&list.zeilenAnzahl, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&list.feldAnzahl, 4 );
|
|
for( int i = 0; i < list.zeilenAnzahl; i++ )
|
|
for( int i = 0; i < list.zeilenAnzahl; i++ )
|
|
{
|
|
{
|
|
for( int j = 0; j < list.feldAnzahl; j++ )
|
|
for( int j = 0; j < list.feldAnzahl; j++ )
|
|
@@ -1348,7 +1348,7 @@ void ISKlient::thread()
|
|
if( j != 1 )
|
|
if( j != 1 )
|
|
{
|
|
{
|
|
int val = list.values[ j + i * list.feldAnzahl ];
|
|
int val = list.values[ j + i * list.feldAnzahl ];
|
|
- klient->sendeEncrypted( (char *)& val, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&val, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -1369,7 +1369,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int acc = 0;
|
|
int acc = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& acc, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&acc, 4 );
|
|
AHDaten *daten = is->zDB()->getSpielHistorie( acc, is );
|
|
AHDaten *daten = is->zDB()->getSpielHistorie( acc, is );
|
|
if( daten )
|
|
if( daten )
|
|
{
|
|
{
|
|
@@ -1378,8 +1378,8 @@ void ISKlient::thread()
|
|
for( char i = 0; i < anz; i++ )
|
|
for( char i = 0; i < anz; i++ )
|
|
{
|
|
{
|
|
AHSpielDaten *spiel = daten->spiele->z( i );
|
|
AHSpielDaten *spiel = daten->spiele->z( i );
|
|
- klient->sendeEncrypted( (char *)& spiel->id, 4 );
|
|
|
|
- klient->sendeEncrypted( (char *)& spiel->karteId, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&spiel->id, 4 );
|
|
|
|
+ klient->sendeEncrypted( (char *)&spiel->karteId, 4 );
|
|
char len = (char)spiel->spiel->getLength();
|
|
char len = (char)spiel->spiel->getLength();
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
if( len )
|
|
if( len )
|
|
@@ -1408,7 +1408,7 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
if( len )
|
|
if( len )
|
|
klient->sendeEncrypted( *spiel->gewinner, len );
|
|
klient->sendeEncrypted( *spiel->gewinner, len );
|
|
- klient->sendeEncrypted( (char *)& spiel->sAnzahl, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&spiel->sAnzahl, 4 );
|
|
char tAnz = (char)spiel->teams->getEintragAnzahl();
|
|
char tAnz = (char)spiel->teams->getEintragAnzahl();
|
|
klient->sendeEncrypted( &tAnz, 1 );
|
|
klient->sendeEncrypted( &tAnz, 1 );
|
|
for( char j = 0; j < tAnz; j++ )
|
|
for( char j = 0; j < tAnz; j++ )
|
|
@@ -1418,12 +1418,12 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
if( len )
|
|
if( len )
|
|
klient->sendeEncrypted( *team->name, len );
|
|
klient->sendeEncrypted( *team->name, len );
|
|
- klient->sendeEncrypted( (char *)& team->sAnzahl, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&team->sAnzahl, 4 );
|
|
len = (char)team->status->getLength();
|
|
len = (char)team->status->getLength();
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
if( len )
|
|
if( len )
|
|
klient->sendeEncrypted( *team->status, len );
|
|
klient->sendeEncrypted( *team->status, len );
|
|
- klient->sendeEncrypted( (char *)& team->farbe, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&team->farbe, 4 );
|
|
char sAnz = (char)team->spieler->getEintragAnzahl();
|
|
char sAnz = (char)team->spieler->getEintragAnzahl();
|
|
klient->sendeEncrypted( &sAnz, 1 );
|
|
klient->sendeEncrypted( &sAnz, 1 );
|
|
for( char k = 0; k < sAnz; k++ )
|
|
for( char k = 0; k < sAnz; k++ )
|
|
@@ -1433,12 +1433,12 @@ void ISKlient::thread()
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
if( len )
|
|
if( len )
|
|
klient->sendeEncrypted( *spieler->name, len );
|
|
klient->sendeEncrypted( *spieler->name, len );
|
|
- klient->sendeEncrypted( (char *)& spieler->punkte, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&spieler->punkte, 4 );
|
|
len = (char)spieler->status->getLength();
|
|
len = (char)spieler->status->getLength();
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
if( len )
|
|
if( len )
|
|
klient->sendeEncrypted( *spieler->status, len );
|
|
klient->sendeEncrypted( *spieler->status, len );
|
|
- klient->sendeEncrypted( (char *)& spieler->farbe, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&spieler->farbe, 4 );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1455,13 +1455,13 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int spielId = 0;
|
|
int spielId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
int port = 0;
|
|
int port = 0;
|
|
Text *ip = new Text();
|
|
Text *ip = new Text();
|
|
if( is->zDB()->getHistorieServerPortIp( klientNummer, spielId, &port, ip ) )
|
|
if( is->zDB()->getHistorieServerPortIp( klientNummer, spielId, &port, ip ) )
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
- klient->sendeEncrypted( (char *)& port, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&port, 4 );
|
|
char len = (char)ip->getLength();
|
|
char len = (char)ip->getLength();
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( *ip, len );
|
|
klient->sendeEncrypted( *ip, len );
|
|
@@ -1478,13 +1478,13 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
unsigned char len = 0;
|
|
unsigned char len = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
char *pf = new char[ len + 1 ];
|
|
char *pf = new char[ len + 1 ];
|
|
pf[ (int)len ] = 0;
|
|
pf[ (int)len ] = 0;
|
|
klient->getNachrichtEncrypted( (char *)pf, len );
|
|
klient->getNachrichtEncrypted( (char *)pf, len );
|
|
int dgId = is->zDB()->getDateiGruppeVonPfad( pf );
|
|
int dgId = is->zDB()->getDateiGruppeVonPfad( pf );
|
|
delete[] pf;
|
|
delete[] pf;
|
|
- klient->sendeEncrypted( (char *)& dgId, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&dgId, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1494,9 +1494,9 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int dg = 0;
|
|
int dg = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& dg, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&dg, 4 );
|
|
int v = is->zDB()->getNeusteDateiGruppe( dg );
|
|
int v = is->zDB()->getNeusteDateiGruppe( dg );
|
|
- klient->sendeEncrypted( (char *)& v, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&v, 4 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1522,7 +1522,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int recht = 0;
|
|
int recht = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& recht, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&recht, 4 );
|
|
if( is->zDB()->hatKlientRecht( klientNummer, recht ) )
|
|
if( is->zDB()->hatKlientRecht( klientNummer, recht ) )
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
else
|
|
else
|
|
@@ -1539,7 +1539,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
unsigned char filterLen = 0;
|
|
unsigned char filterLen = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& filterLen, 1 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&filterLen, 1 );
|
|
char *filter = new char[ filterLen + 1 ];
|
|
char *filter = new char[ filterLen + 1 ];
|
|
filter[ (int)filterLen ] = 0;
|
|
filter[ (int)filterLen ] = 0;
|
|
if( filterLen )
|
|
if( filterLen )
|
|
@@ -1550,11 +1550,11 @@ void ISKlient::thread()
|
|
klient->getNachrichtEncrypted( &sortRichtung, 1 );
|
|
klient->getNachrichtEncrypted( &sortRichtung, 1 );
|
|
Result res = is->zDB()->getKartenListe( klientNummer, filter, sortSpalte, sortRichtung );
|
|
Result res = is->zDB()->getKartenListe( klientNummer, filter, sortSpalte, sortRichtung );
|
|
delete[] filter;
|
|
delete[] filter;
|
|
- klient->sendeEncrypted( (char *)& res.zeilenAnzahl, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&res.zeilenAnzahl, 4 );
|
|
for( int i = 0; i < res.zeilenAnzahl; i++ )
|
|
for( int i = 0; i < res.zeilenAnzahl; i++ )
|
|
{
|
|
{
|
|
int val = res.values[ i * 6 ];
|
|
int val = res.values[ i * 6 ];
|
|
- klient->sendeEncrypted( (char *)& val, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&val, 4 );
|
|
char len = (char)res.values[ i * 6 + 1 ].getLength();
|
|
char len = (char)res.values[ i * 6 + 1 ].getLength();
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
if( len )
|
|
if( len )
|
|
@@ -1564,11 +1564,11 @@ void ISKlient::thread()
|
|
if( len )
|
|
if( len )
|
|
klient->sendeEncrypted( res.values[ i * 6 + 2 ], len );
|
|
klient->sendeEncrypted( res.values[ i * 6 + 2 ], len );
|
|
val = res.values[ i * 6 + 3 ];
|
|
val = res.values[ i * 6 + 3 ];
|
|
- klient->sendeEncrypted( (char *)& val, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&val, 4 );
|
|
val = res.values[ i * 6 + 4 ];
|
|
val = res.values[ i * 6 + 4 ];
|
|
- klient->sendeEncrypted( (char *)& val, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&val, 4 );
|
|
val = res.values[ i * 6 + 5 ];
|
|
val = res.values[ i * 6 + 5 ];
|
|
- klient->sendeEncrypted( (char *)& val, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&val, 4 );
|
|
}
|
|
}
|
|
res.destroy();
|
|
res.destroy();
|
|
}
|
|
}
|
|
@@ -1583,7 +1583,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int karteId = 0;
|
|
int karteId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
int port = 0;
|
|
int port = 0;
|
|
Text ip;
|
|
Text ip;
|
|
if( !is->zDB()->getEditorServerPortIp( klientNummer, karteId, &port, &ip ) )
|
|
if( !is->zDB()->getEditorServerPortIp( klientNummer, karteId, &port, &ip ) )
|
|
@@ -1592,7 +1592,7 @@ void ISKlient::thread()
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
- klient->sendeEncrypted( (char *)& port, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&port, 4 );
|
|
char len = (char)ip.getLength();
|
|
char len = (char)ip.getLength();
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( ip, len );
|
|
klient->sendeEncrypted( ip, len );
|
|
@@ -1608,7 +1608,7 @@ void ISKlient::thread()
|
|
{
|
|
{
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
int karteId = 0;
|
|
int karteId = 0;
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
int port = 0;
|
|
int port = 0;
|
|
Text ip;
|
|
Text ip;
|
|
if( !is->zDB()->getKartenServerPortIp( klientNummer, karteId, &port, &ip ) )
|
|
if( !is->zDB()->getKartenServerPortIp( klientNummer, karteId, &port, &ip ) )
|
|
@@ -1617,7 +1617,7 @@ void ISKlient::thread()
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
- klient->sendeEncrypted( (char *)& port, 4 );
|
|
|
|
|
|
+ klient->sendeEncrypted( (char *)&port, 4 );
|
|
char len = (char)ip.getLength();
|
|
char len = (char)ip.getLength();
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( &len, 1 );
|
|
klient->sendeEncrypted( ip, len );
|
|
klient->sendeEncrypted( ip, len );
|