51 static const Uint16 _messages[] = {
111 Log::info(
"Received update host \"%s\" from login server.",
121 worldCount = (msg.
getLength() - 47) / 32;
129 for (
int i = 0; i < worldCount; i++)
153 Log::info(
"Login::error code: %i", code);
171 "the game. Please contact the GM team.");
178 "banned from the game until "
179 "%s.\nPlease contact the GM "
180 "team via the forums."),
274 const std::string &oldPassword,
275 const std::string &newPassword)
313 const std::string &password)
319 const std::string &password)
static void setState(State state)
unsigned short characterSlots
The number of character slots.
const uint16_t * handledMessages
Worlds getWorlds() const override
bool mRegistrationEnabled
void sendLoginRegister(const std::string &username, const std::string &password)
void changePassword(const std::string &username, const std::string &oldPassword, const std::string &newPassword) override
void getRegistrationDetails() override
void unregisterAccount(const std::string &username, const std::string &password) override
void loginAccount(LoginData *loginData) override
void changeEmail(const std::string &email) override
bool isRegistrationEnabled() override
void handleMessage(MessageIn &msg) override
void disconnect() override
void registerAccount(LoginData *loginData) override
bool isConnected() override
void chooseServer(unsigned int server) override
Used for parsing an incoming message from eAthena.
std::string readString(int length=-1)
Reads a string.
void skip(unsigned int length)
Skips a given number of bytes.
uint16_t readInt16()
Reads an unsigned 16-bit integer from the message.
uint8_t readInt8()
Reads an unsigned 8-bit integer from the message.
uint16_t getId() const
Returns the message ID.
uint32_t readInt32()
Reads an unsigned 32-bit integer from the message.
unsigned int getLength() const
Returns the message length.
Used for building an outgoing message to eAthena.
void writeInt32(uint32_t value)
Writes an unsigned 32-bit integer to the message.
void writeInt8(uint8_t value)
Writes an unsigned 8-bit integer to the message.
void writeString(const std::string &string, int length=-1)
Writes a string.
bool connect(const ServerInfo &server)
const ServerInfo & getServer() const
@ STATE_CHANGEPASSWORD_SUCCESS
@ STATE_ACCOUNTCHANGE_ERROR
void delete_all(Container &c)
ManaServ::LoginHandler * loginHandler
Net::LoginHandler * loginHandler
void info(const char *log_text,...) LOG_PRINTF_ATTR
Warning: buffers and other variables are shared, so there can be only one connection active at a time...
@ SMSG_CHAR_PASSWORD_RESPONSE
@ CMSG_CHAR_PASSWORD_CHANGE
@ CMSG_SERVER_VERSION_REQUEST
@ SMSG_SERVER_VERSION_RESPONSE
std::string strprintf(char const *format,...)
A safe version of sprintf that returns a std::string of the result.
const char * ipToString(int address)
Converts the given IP address to a string.
std::vector< WorldInfo * > Worlds