EOSERV Forum > EOSERV > how to fix account create bug.
Topic is locked.
Page: << 1 >>
how to fix account create bug.
Author Message
Post #1024 [guide] how to fix account create bug.

Find account handler(src->handlers->account), find case PACKET_REQUEST, and paste this code fragment(name validation):

case PACKET_REQUEST: // Check if a character exists
  {
  std::string username = reader.GetEndString();

  std::transform(username.begin(), username.end(), username.begin(), static_cast<int(*)(int)>(std::tolower));

  reply.SetID(PACKET_ACCOUNT, PACKET_REPLY);
  if (!Player::ValidName(username))
  {
  reply.AddShort(PACKET_ACCOUNT_NOT_APPROVED);
  reply.AddString("NO");
  }
  else if (Player::Exists(username))
  {
  reply.AddShort(PACKET_ACCOUNT_EXISTS);
  reply.AddString("NO");
  }
  else
  {
  reply.AddShort(PACKET_ACCOUNT_CONTINUE);
  reply.AddString("OK");
  }
  CLIENT_SEND(reply);
  }


15 years, 7 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > EOSERV > how to fix account create bug.