Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Fix Server Full Sources Muemu  (Visto 1209 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline TioMostaza on: October 11, 2017, 10:21:28 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 6
  • pe
Hola estoy compilando los sources muemu y cuando intento entrar al server me dice servidor full  Me podrian ayudar diciendome en que parte de el codigo pongo el fix

Offline Ryuno #1 on: October 11, 2017, 10:23:17 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 487
  • Gracias recibida: 1103
  • dz
lo fixeas en el source del joinserver.

Offline TioMostaza #2 on: October 11, 2017, 10:25:28 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 6
  • pe
lo fixeas en el source del joinserver.
en que parte amigo ya le di vuelta y media al joinserver y no veo el codigo o donde ponerlo


este es el code

Code:
    if(gAccountManager.GetAccountCount() >=
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
        )
 
 
and CServerDisplayer::SetWindowName
 
Code:
    wsprintf(buff,"[%s] JoinServer (QueueSize : %d) (AccountCount : %d/%d)",JOINSERVER_VERSION,gSocketManager.GetQueueSize(),
        gAccountManager.GetAccountCount(),
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
    );
 
 
by ashlay

si me enviara una foto donde ponerlo o el archivo .h o cpp seria feliz

Offline Ryuno #3 on: October 11, 2017, 10:33:45 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 487
  • Gracias recibida: 1103
  • dz
lo fixeas en el source del joinserver.
en que parte amigo ya le di vuelta y media al joinserver y no veo el codigo o donde ponerlo


este es el code

Code:
    if(gAccountManager.GetAccountCount() >=
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
        )
 
 
and CServerDisplayer::SetWindowName
 
Code:
    wsprintf(buff,"[%s] JoinServer (QueueSize : %d) (AccountCount : %d/%d)",JOINSERVER_VERSION,gSocketManager.GetQueueSize(),
        gAccountManager.GetAccountCount(),
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
    );
 
 
by ashlay

si me enviara una foto donde ponerlo o el archivo .h o cpp seria feliz
la idea es formentar el aprendisaje
busca la funcion
void GJConnectAccountRecv(SDHP_CONNECT_ACCOUNT_RECV* lpMsg,int index) // OK

Remplaza la info dentro de esa funcion por esta.


{
   SDHP_CONNECT_ACCOUNT_SEND pMsg;

   pMsg.header.set(0x01,sizeof(pMsg));

   pMsg.index = lpMsg->index;

   memcpy(pMsg.account,lpMsg->account,sizeof(pMsg.account));

   pMsg.result = 1;

   if(CheckTextSyntax(lpMsg->account,sizeof(lpMsg->account)) == 0)
   {
      pMsg.result = 2;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   ACCOUNT_INFO AccountInfo;

   if(gAccountManager.GetAccountInfo(&AccountInfo,lpMsg->account) != 0)
   {
      pMsg.result = 3;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      JGAccountAlreadyConnectedSend(AccountInfo.GameServerCode,AccountInfo.UserIndex,AccountInfo.Account);
      return;
   }

       if(gAccountManager.GetAccountCount() >=
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
        ) //Fix 2
   {
      pMsg.result = 4;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   if(MD5Encryption == 0)
   {
      if(gQueryManager.ExecQuery("SELECT memb__pwd FROM MEMB_INFO WHERE memb___id='%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
      {
         gQueryManager.Close();
         pMsg.result = 2;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      char password[11] = {0};

      gQueryManager.GetAsString("memb__pwd",password,sizeof(password));

      if(strcmp(lpMsg->password,password) != 0)
      {
         gQueryManager.Close();
         pMsg.result = 0;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      gQueryManager.Close();
   }
   else
   {
      if(gQueryManager.ExecQuery("SELECT memb__pwd FROM MEMB_INFO WHERE memb___id='%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
      {
         gQueryManager.Close();
         pMsg.result = 2;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      BYTE password[16] = {0};

      gQueryManager.GetAsBinary("memb__pwd",password,sizeof(password));

      MD5 MD5Hash;

      if(MD5Hash.MD5_CheckValue(lpMsg->password,(char*)password,MakeAccountKey(lpMsg->account)) == 0)
      {
         gQueryManager.Close();
         pMsg.result = 0;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      gQueryManager.Close();
   }

   if(gQueryManager.ExecQuery("SELECT sno__numb,bloc_code FROM MEMB_INFO WHERE memb___id='%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
   {
      gQueryManager.Close();
      pMsg.result = 2;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   gQueryManager.GetAsString("sno__numb",pMsg.PersonalCode,sizeof(pMsg.PersonalCode));

   pMsg.BlockCode = (BYTE)gQueryManager.GetAsInteger("bloc_code");

   gQueryManager.Close();

   if(gQueryManager.ExecQuery("EXEC WZ_GetAccountLevel '%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
   {
      gQueryManager.Close();
      pMsg.result = 2;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   pMsg.AccountLevel = gQueryManager.GetAsInteger("AccountLevel");

   gQueryManager.GetAsString("AccountExpireDate",pMsg.AccountExpireDate,sizeof(pMsg.AccountExpireDate));

   gQueryManager.Close();

   gQueryManager.ExecQuery("EXEC WZ_CONNECT_MEMB '%s','%s','%s'",lpMsg->account,gServerManager[index].m_ServerName,lpMsg->IpAddress);

   gQueryManager.Close();

   gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);

   strcpy_s(AccountInfo.Account,lpMsg->account);

   strcpy_s(AccountInfo.IpAddress,lpMsg->IpAddress);

   AccountInfo.UserIndex = lpMsg->index;
   AccountInfo.GameServerCode = gServerManager[index].m_ServerCode;
   AccountInfo.MapServerMove = 0;
   AccountInfo.MapServerMoveTime = 0;
   AccountInfo.LastServerCode = -1;
   AccountInfo.NextServerCode = -1;
   AccountInfo.Map = 0;
   AccountInfo.X = 0;
   AccountInfo.Y = 0;
   AccountInfo.AuthCode1 = 0;
   AccountInfo.AuthCode2 = 0;
   AccountInfo.AuthCode3 = 0;
   AccountInfo.AuthCode4 = 0;

   gAccountManager.InsertAccountInfo(AccountInfo);

   gLog.Output(LOG_ACCOUNT,"[AccountInfo] Account connected (Account: %s, IpAddress: %s, GameServerCode: %d)",AccountInfo.Account,AccountInfo.IpAddress,AccountInfo.GameServerCode);
}




//mas facil imposible mi buen amigo.

Offline TioMostaza #4 on: October 12, 2017, 10:18:39 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 6
  • pe
lo fixeas en el source del joinserver.
en que parte amigo ya le di vuelta y media al joinserver y no veo el codigo o donde ponerlo


este es el code

Code:
    if(gAccountManager.GetAccountCount() >=
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
        )
 
 
and CServerDisplayer::SetWindowName
 
Code:
    wsprintf(buff,"[%s] JoinServer (QueueSize : %d) (AccountCount : %d/%d)",JOINSERVER_VERSION,gSocketManager.GetQueueSize(),
        gAccountManager.GetAccountCount(),
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
    );
 
 
by ashlay

si me enviara una foto donde ponerlo o el archivo .h o cpp seria feliz
la idea es formentar el aprendisaje
busca la funcion
void GJConnectAccountRecv(SDHP_CONNECT_ACCOUNT_RECV* lpMsg,int index) // OK

Remplaza la info dentro de esa funcion por esta.


{
   SDHP_CONNECT_ACCOUNT_SEND pMsg;

   pMsg.header.set(0x01,sizeof(pMsg));

   pMsg.index = lpMsg->index;

   memcpy(pMsg.account,lpMsg->account,sizeof(pMsg.account));

   pMsg.result = 1;

   if(CheckTextSyntax(lpMsg->account,sizeof(lpMsg->account)) == 0)
   {
      pMsg.result = 2;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   ACCOUNT_INFO AccountInfo;

   if(gAccountManager.GetAccountInfo(&AccountInfo,lpMsg->account) != 0)
   {
      pMsg.result = 3;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      JGAccountAlreadyConnectedSend(AccountInfo.GameServerCode,AccountInfo.UserIndex,AccountInfo.Account);
      return;
   }

       if(gAccountManager.GetAccountCount() >=
#if    PROTECT_STATE
        gJoinServerMaxAccount[gProtect.m_AuthInfo.PackageType][gProtect.m_AuthInfo.PlanType]
#else
        MAX_ACCOUNT
#endif
        ) //Fix 2
   {
      pMsg.result = 4;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   if(MD5Encryption == 0)
   {
      if(gQueryManager.ExecQuery("SELECT memb__pwd FROM MEMB_INFO WHERE memb___id='%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
      {
         gQueryManager.Close();
         pMsg.result = 2;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      char password[11] = {0};

      gQueryManager.GetAsString("memb__pwd",password,sizeof(password));

      if(strcmp(lpMsg->password,password) != 0)
      {
         gQueryManager.Close();
         pMsg.result = 0;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      gQueryManager.Close();
   }
   else
   {
      if(gQueryManager.ExecQuery("SELECT memb__pwd FROM MEMB_INFO WHERE memb___id='%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
      {
         gQueryManager.Close();
         pMsg.result = 2;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      BYTE password[16] = {0};

      gQueryManager.GetAsBinary("memb__pwd",password,sizeof(password));

      MD5 MD5Hash;

      if(MD5Hash.MD5_CheckValue(lpMsg->password,(char*)password,MakeAccountKey(lpMsg->account)) == 0)
      {
         gQueryManager.Close();
         pMsg.result = 0;
         gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
         return;
      }

      gQueryManager.Close();
   }

   if(gQueryManager.ExecQuery("SELECT sno__numb,bloc_code FROM MEMB_INFO WHERE memb___id='%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
   {
      gQueryManager.Close();
      pMsg.result = 2;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   gQueryManager.GetAsString("sno__numb",pMsg.PersonalCode,sizeof(pMsg.PersonalCode));

   pMsg.BlockCode = (BYTE)gQueryManager.GetAsInteger("bloc_code");

   gQueryManager.Close();

   if(gQueryManager.ExecQuery("EXEC WZ_GetAccountLevel '%s'",lpMsg->account) == 0 || gQueryManager.Fetch() == SQL_NO_DATA)
   {
      gQueryManager.Close();
      pMsg.result = 2;
      gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);
      return;
   }

   pMsg.AccountLevel = gQueryManager.GetAsInteger("AccountLevel");

   gQueryManager.GetAsString("AccountExpireDate",pMsg.AccountExpireDate,sizeof(pMsg.AccountExpireDate));

   gQueryManager.Close();

   gQueryManager.ExecQuery("EXEC WZ_CONNECT_MEMB '%s','%s','%s'",lpMsg->account,gServerManager[index].m_ServerName,lpMsg->IpAddress);

   gQueryManager.Close();

   gSocketManager.DataSend(index,(BYTE*)&pMsg,pMsg.header.size);

   strcpy_s(AccountInfo.Account,lpMsg->account);

   strcpy_s(AccountInfo.IpAddress,lpMsg->IpAddress);

   AccountInfo.UserIndex = lpMsg->index;
   AccountInfo.GameServerCode = gServerManager[index].m_ServerCode;
   AccountInfo.MapServerMove = 0;
   AccountInfo.MapServerMoveTime = 0;
   AccountInfo.LastServerCode = -1;
   AccountInfo.NextServerCode = -1;
   AccountInfo.Map = 0;
   AccountInfo.X = 0;
   AccountInfo.Y = 0;
   AccountInfo.AuthCode1 = 0;
   AccountInfo.AuthCode2 = 0;
   AccountInfo.AuthCode3 = 0;
   AccountInfo.AuthCode4 = 0;

   gAccountManager.InsertAccountInfo(AccountInfo);

   gLog.Output(LOG_ACCOUNT,"[AccountInfo] Account connected (Account: %s, IpAddress: %s, GameServerCode: %d)",AccountInfo.Account,AccountInfo.IpAddress,AccountInfo.GameServerCode);
}




//mas facil imposible mi buen amigo.

gracias ya lo puse era en JoinServerProtocol.cpp

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
1307 Views
Last post May 08, 2017, 11:22:59 AM
by ZabiinoOo
6 Replies
740 Views
Last post January 02, 2018, 07:06:04 PM
by MichaelC
3 Replies
742 Views
Last post May 07, 2018, 02:53:47 PM
by IzReal
11 Replies
2329 Views
Last post August 09, 2019, 05:10:42 PM
by giancarlo
8 Replies
555 Views
Last post February 27, 2019, 04:03:31 PM
by iramondias