|
@@ -1222,25 +1222,25 @@ bool ESGWeiterleitung::spielErstelltAbbrechen( int spielErstelltId )
|
|
bool ret = 1;
|
|
bool ret = 1;
|
|
Text *ip = new Text( "" );
|
|
Text *ip = new Text( "" );
|
|
int port = 0;
|
|
int port = 0;
|
|
- ret = ret & es->zDB()->getSpielServer( spielErstelltId, ip, &port );
|
|
|
|
|
|
+ ret &= es->zDB()->getSpielServer( spielErstelltId, ip, &port );
|
|
if( ip->getLength() )
|
|
if( ip->getLength() )
|
|
{
|
|
{
|
|
Klient *klient = new Klient();
|
|
Klient *klient = new Klient();
|
|
unsigned char key[ 20 ] = { 253, 234, 211, 132, 121, 230, 95, 145, 201, 13, 43, 77, 153, 223, 253, 69, 234, 43, 52, 99 };
|
|
unsigned char key[ 20 ] = { 253, 234, 211, 132, 121, 230, 95, 145, 201, 13, 43, 77, 153, 223, 253, 69, 234, 43, 52, 99 };
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
- ret = ret & klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
- ret = ret & klient->sendeEncrypted( "\x8\x1", 2 );
|
|
|
|
|
|
+ ret &= klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
+ ret &= klient->sendeEncrypted( "\x8\x1", 2 );
|
|
char res = 0;
|
|
char res = 0;
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
- ret = ret & klient->sendeEncrypted( (char *)&spielErstelltId, 4 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&spielErstelltId, 4 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
}
|
|
}
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
- ret = ret & klient->sendeEncrypted( "\x8\x0", 2 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( "\x8\x0", 2 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
es->addGesendet( klient->getUploadBytes( 1 ) );
|
|
es->addGesendet( klient->getUploadBytes( 1 ) );
|
|
@@ -1263,33 +1263,33 @@ bool ESGWeiterleitung::spielerLeavesGruppe( int gruppeId, int accountId )
|
|
continue;
|
|
continue;
|
|
Text *ip = new Text( "" );
|
|
Text *ip = new Text( "" );
|
|
int port = 0;
|
|
int port = 0;
|
|
- ret = ret & es->zDB()->getChatServer( account, ip, &port );
|
|
|
|
|
|
+ ret = ret && es->zDB()->getChatServer( account, ip, &port );
|
|
if( ip->getLength() )
|
|
if( ip->getLength() )
|
|
{
|
|
{
|
|
Klient *klient = new Klient();
|
|
Klient *klient = new Klient();
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
- ret = ret & klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
- ret = ret & klient->sendeEncrypted( "\5\x15", 2 );
|
|
|
|
|
|
+ ret &= klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
+ ret &= klient->sendeEncrypted( "\5\x15", 2 );
|
|
char res = 0;
|
|
char res = 0;
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
- ret = ret & klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&accountId, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&accountId, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
}
|
|
}
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
- ret = ret & klient->sendeEncrypted( "\5\x18", 2 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( "\5\x18", 2 );
|
|
res = 0;
|
|
res = 0;
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
- ret = ret & klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
}
|
|
}
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
@@ -1315,23 +1315,23 @@ bool ESGWeiterleitung::setGruppeAdmin( int gruppeId, int adminId )
|
|
int account = accId->get( i );
|
|
int account = accId->get( i );
|
|
Text *ip = new Text( "" );
|
|
Text *ip = new Text( "" );
|
|
int port = 0;
|
|
int port = 0;
|
|
- ret = ret & es->zDB()->getChatServer( account, ip, &port );
|
|
|
|
|
|
+ ret &= es->zDB()->getChatServer( account, ip, &port );
|
|
if( ip->getLength() )
|
|
if( ip->getLength() )
|
|
{
|
|
{
|
|
Klient *klient = new Klient();
|
|
Klient *klient = new Klient();
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
- ret = ret & klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
- ret = ret & klient->sendeEncrypted( "\5\x1B", 2 );
|
|
|
|
|
|
+ ret &= klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
+ ret &= klient->sendeEncrypted( "\5\x1B", 2 );
|
|
char res = 0;
|
|
char res = 0;
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
- ret = ret & klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&adminId, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&adminId, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
}
|
|
}
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
@@ -1357,23 +1357,23 @@ bool ESGWeiterleitung::spielerLeavesChatroom( int chatroomId, int accountId )
|
|
continue;
|
|
continue;
|
|
Text *ip = new Text( "" );
|
|
Text *ip = new Text( "" );
|
|
int port = 0;
|
|
int port = 0;
|
|
- ret = ret & es->zDB()->getChatServer( account, ip, &port );
|
|
|
|
|
|
+ ret &= es->zDB()->getChatServer( account, ip, &port );
|
|
if( ip->getLength() )
|
|
if( ip->getLength() )
|
|
{
|
|
{
|
|
Klient *klient = new Klient();
|
|
Klient *klient = new Klient();
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
- ret = ret & klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
- ret = ret & klient->sendeEncrypted( "\5\xE", 2 );
|
|
|
|
|
|
+ ret &= klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
+ ret &= klient->sendeEncrypted( "\5\xE", 2 );
|
|
char res = 0;
|
|
char res = 0;
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
- ret = ret & klient->sendeEncrypted( (char *)&accountId, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&chatroomId, 4 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&accountId, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&chatroomId, 4 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
}
|
|
}
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
@@ -1394,22 +1394,22 @@ bool ESGWeiterleitung::setChatroomAdmin( int chatroomId, int adminId )
|
|
bool ret = 1;
|
|
bool ret = 1;
|
|
Text *ip = new Text( "" );
|
|
Text *ip = new Text( "" );
|
|
int port = 0;
|
|
int port = 0;
|
|
- ret = ret & es->zDB()->getChatServer( adminId, ip, &port );
|
|
|
|
|
|
+ ret &= es->zDB()->getChatServer( adminId, ip, &port );
|
|
if( ip->getLength() )
|
|
if( ip->getLength() )
|
|
{
|
|
{
|
|
Klient *klient = new Klient();
|
|
Klient *klient = new Klient();
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
- ret = ret & klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
- ret = ret & klient->sendeEncrypted( "\5\x12", 2 );
|
|
|
|
|
|
+ ret &= klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
+ ret &= klient->sendeEncrypted( "\5\x12", 2 );
|
|
char res = 0;
|
|
char res = 0;
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
- ret = ret & klient->sendeEncrypted( (char *)&adminId, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&chatroomId, 4 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&adminId, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&chatroomId, 4 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
}
|
|
}
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
@@ -1433,22 +1433,22 @@ bool ESGWeiterleitung::kickSpielerAusGruppe( int gruppeId )
|
|
int account = accId->get( i );
|
|
int account = accId->get( i );
|
|
Text *ip = new Text( "" );
|
|
Text *ip = new Text( "" );
|
|
int port = 0;
|
|
int port = 0;
|
|
- ret = ret & es->zDB()->getChatServer( account, ip, &port );
|
|
|
|
|
|
+ ret &= es->zDB()->getChatServer( account, ip, &port );
|
|
if( ip->getLength() )
|
|
if( ip->getLength() )
|
|
{
|
|
{
|
|
Klient *klient = new Klient();
|
|
Klient *klient = new Klient();
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
unsigned char key[ 20 ] = { 78, 20, 190, 133, 10, 175, 51, 96, 62, 1, 180, 194, 126, 50, 211, 154, 105, 227, 22, 101 };
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setSendeKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
klient->setEmpfangKey( (char *)key, 20 );
|
|
- ret = ret & klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
- ret = ret & klient->sendeEncrypted( "\5\x16", 2 );
|
|
|
|
|
|
+ ret &= klient->verbinde( (unsigned short)port, ip->getText() );
|
|
|
|
+ ret &= klient->sendeEncrypted( "\5\x16", 2 );
|
|
char res = 0;
|
|
char res = 0;
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
if( res )
|
|
if( res )
|
|
{
|
|
{
|
|
- ret = ret & klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
- ret = ret & klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
- ret = ret & klient->getNachrichtEncrypted( &res, 1 );
|
|
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&account, 4 );
|
|
|
|
+ ret &= klient->sendeEncrypted( (char *)&gruppeId, 4 );
|
|
|
|
+ ret &= klient->getNachrichtEncrypted( &res, 1 );
|
|
}
|
|
}
|
|
ret = (char)ret & res;
|
|
ret = (char)ret & res;
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|
|
es->addEmpfangen( klient->getDownloadBytes( 1 ) );
|