mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-10-14 04:13:15 -04:00
closer
This commit is contained in:
@@ -209,8 +209,6 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
|
||||
parentAccount = api.getString("mainAccount");
|
||||
childAccounts = api.getStringVector("subAccounts");
|
||||
|
||||
WARNING(true, ("Raw: %s", api.getRaw().c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -250,28 +248,26 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
suid = h(uname.c_str());
|
||||
}
|
||||
|
||||
// if (childAccounts.size() == 0) {
|
||||
std::hash<std::string> h;
|
||||
StationId parent = h(parentAccount);
|
||||
std::hash<std::string> h;
|
||||
StationId parent = h(parentAccount);
|
||||
|
||||
WARNING(true, ("Parent account is %s", parentAccount.c_str()));
|
||||
WARNING(true, ("Parent account is %s", parentAccount.c_str()));
|
||||
|
||||
for (auto i : childAccounts) {
|
||||
WARNING(true, ("Found child account %s", i.c_str()));
|
||||
for (auto i : childAccounts) {
|
||||
WARNING(true, ("Found child account %s %llu", i.c_str(), h(i)));
|
||||
|
||||
if (i.length() > MAX_ACCOUNT_NAME_LENGTH) {
|
||||
i.resize(MAX_ACCOUNT_NAME_LENGTH);
|
||||
}
|
||||
if (i.length() > MAX_ACCOUNT_NAME_LENGTH) {
|
||||
i.resize(MAX_ACCOUNT_NAME_LENGTH);
|
||||
}
|
||||
|
||||
// insert all related accounts, if not already there, into the db
|
||||
DatabaseConnection::getInstance().upsertAccountRelationship(parent, h(i));
|
||||
}
|
||||
//}
|
||||
// insert all related accounts, if not already there, into the db
|
||||
DatabaseConnection::getInstance().upsertAccountRelationship(parent, h(i));
|
||||
}
|
||||
|
||||
LOG("LoginClientConnection", ("validateClient() for stationId (%lu) at IP (%s), id (%s)", m_stationId, getRemoteAddress().c_str(), uname.c_str()));
|
||||
|
||||
LoginServer::getInstance().onValidateClient(suid, uname, this, true, NULL, 0xFFFFFFFF, 0xFFFFFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user