Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

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

0 Miembros and 1 Guest are viewing this topic.

Offline TioMostaza Posteado: October 11, 2017, 11:21:28 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 80
  • Gracias recibida: 22
  • 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

Gracias:


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

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


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

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 80
  • Gracias recibida: 22
  • 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 Posteado: October 11, 2017, 11:33:45 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 505
  • Gracias recibida: 2023
  • 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 Posteado: October 12, 2017, 11:18:39 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 80
  • Gracias recibida: 22
  • 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
3843 Views
Last post May 08, 2017, 12:22:59 PM
by ZabiinoOo
16 Replies
8801 Views
Last post August 03, 2023, 11:18:53 PM
by Ryzenn
3 Replies
1131 Views
Last post April 21, 2020, 09:38:45 PM
by yhoon
72 Replies
10429 Views
Last post April 30, 2023, 10:24:44 PM
by vamchy33
40 Replies
22263 Views
Last post March 11, 2024, 03:21:18 AM
by ledemkhoc