mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
code format
This commit is contained in:
parent
14650ee7f3
commit
a054dd8e78
@ -171,7 +171,7 @@ namespace console
|
||||
}
|
||||
else
|
||||
{
|
||||
std::this_thread::sleep_for(10ms);
|
||||
std::this_thread::sleep_for(1ms);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,13 +167,14 @@ namespace demonware
|
||||
{
|
||||
int getaddrinfo_stub(PCSTR pNodeName, PCSTR pServiceName, const ADDRINFOA* pHints, PADDRINFOA* ppResult)
|
||||
{
|
||||
printf("[ network ]: [getaddrinfo]: %s\n", pNodeName);
|
||||
return getaddrinfo(pNodeName, pServiceName, pHints, ppResult);
|
||||
}
|
||||
|
||||
hostent* gethostbyname_stub(const char* name)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("[ network ]: [gethostbyname]: \"%s\"\n", name);
|
||||
#endif
|
||||
|
||||
const auto server = find_server_by_name(name);
|
||||
|
||||
|
@ -161,7 +161,7 @@ namespace demonware
|
||||
result.append(utils::string::va("Date: %s GMT\r\n", date));
|
||||
result.append(utils::string::va("Content-Length: %d\r\n\r\n", content.size()));
|
||||
result.append(content);
|
||||
printf("%s\n", result.data());
|
||||
|
||||
raw_reply reply(result);
|
||||
this->send_reply(&reply);
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdAnticheat::bdAnticheat() : service(38, "bdAnticheat")
|
||||
{
|
||||
this->register_task(2, &bdAnticheat::unk2);
|
||||
@ -23,5 +22,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdAnticheat final : public service
|
||||
{
|
||||
public:
|
||||
@ -12,5 +11,4 @@ namespace demonware
|
||||
void unk2(service_server* server, byte_buffer* buffer) const;
|
||||
void report_console_details(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,27 +3,25 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
static uint8_t bandwidth_iw6[51] =
|
||||
{
|
||||
0x0F, 0xC1, 0x1C, 0x37, 0xB8, 0xEF, 0x7C, 0xD6, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xF4, 0x01, 0x00, 0x00, 0xD0, 0x07,
|
||||
0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x88, 0x13, 0x00, 0x00, 0xF4, 0x01,
|
||||
0x00, 0x00, 0x02, 0x0C, 0x88, 0xB3, 0x04, 0x65, 0x89, 0xBF, 0xC3, 0x6A,
|
||||
0x27, 0x94, 0xD4, 0x8F
|
||||
};
|
||||
|
||||
static uint8_t bandwidth_iw6[51] =
|
||||
{
|
||||
0x0F, 0xC1, 0x1C, 0x37, 0xB8, 0xEF, 0x7C, 0xD6, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xF4, 0x01, 0x00, 0x00, 0xD0, 0x07,
|
||||
0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x88, 0x13, 0x00, 0x00, 0xF4, 0x01,
|
||||
0x00, 0x00, 0x02, 0x0C, 0x88, 0xB3, 0x04, 0x65, 0x89, 0xBF, 0xC3, 0x6A,
|
||||
0x27, 0x94, 0xD4, 0x8F
|
||||
};
|
||||
|
||||
bdBandwidthTest::bdBandwidthTest() : service(18, "bdBandwidthTest")
|
||||
{
|
||||
}
|
||||
|
||||
void bdBandwidthTest::exec_task(service_server* server, const std::string& data)
|
||||
{
|
||||
byte_buffer buffer;
|
||||
buffer.write(sizeof bandwidth_iw6, bandwidth_iw6);
|
||||
|
||||
auto reply = server->create_message(5);
|
||||
reply->send(&buffer, true);
|
||||
}
|
||||
bdBandwidthTest::bdBandwidthTest() : service(18, "bdBandwidthTest")
|
||||
{
|
||||
}
|
||||
|
||||
void bdBandwidthTest::exec_task(service_server* server, const std::string& data)
|
||||
{
|
||||
byte_buffer buffer;
|
||||
buffer.write(sizeof bandwidth_iw6, bandwidth_iw6);
|
||||
|
||||
auto reply = server->create_message(5);
|
||||
reply->send(&buffer, true);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdBandwidthTest final : public service
|
||||
{
|
||||
public:
|
||||
@ -11,5 +10,4 @@ namespace demonware
|
||||
private:
|
||||
void exec_task(service_server* server, const std::string& data) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdContentStreaming::bdContentStreaming() : service(50, "bdContentStreaming")
|
||||
{
|
||||
this->register_task(2, &bdContentStreaming::unk2);
|
||||
@ -23,5 +22,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdContentStreaming final : public service
|
||||
{
|
||||
public:
|
||||
@ -12,5 +11,4 @@ namespace demonware
|
||||
void unk2(service_server* server, byte_buffer* buffer) const;
|
||||
void unk3(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdCounters::bdCounters() : service(23, "bdCounters")
|
||||
{
|
||||
this->register_task(1, &bdCounters::unk1);
|
||||
@ -23,5 +22,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdCounters final : public service
|
||||
{
|
||||
public:
|
||||
@ -12,5 +11,4 @@ namespace demonware
|
||||
void unk1(service_server* server, byte_buffer* buffer) const;
|
||||
void unk2(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdEventLog::bdEventLog() : service(67, "bdEventLog")
|
||||
{
|
||||
this->register_task(6, &bdEventLog::unk6);
|
||||
@ -15,5 +14,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdEventLog final : public service
|
||||
{
|
||||
public:
|
||||
@ -11,5 +10,4 @@ namespace demonware
|
||||
private:
|
||||
void unk6(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdFacebook::bdFacebook() : service(36, "bdFacebook")
|
||||
{
|
||||
this->register_task(1, &bdFacebook::unk1);
|
||||
@ -39,5 +38,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdFacebook final : public service
|
||||
{
|
||||
public:
|
||||
@ -14,5 +13,4 @@ namespace demonware
|
||||
void unk7(service_server* server, byte_buffer* buffer) const;
|
||||
void unk8(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdGroups::bdGroups() : service(28, "bdGroup")
|
||||
{
|
||||
this->register_task(1, &bdGroups::set_groups);
|
||||
@ -23,5 +22,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdGroups final : public service
|
||||
{
|
||||
public:
|
||||
@ -12,5 +11,4 @@ namespace demonware
|
||||
void set_groups(service_server* server, byte_buffer* buffer) const;
|
||||
void unk4(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdMarketing::bdMarketing() : service(139, "bdMarketing")
|
||||
{
|
||||
this->register_task(3, &bdMarketing::unk3);
|
||||
@ -15,5 +14,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdMarketing final : public service
|
||||
{
|
||||
public:
|
||||
@ -11,5 +10,4 @@ namespace demonware
|
||||
private:
|
||||
void unk3(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdMatchMaking2::bdMatchMaking2() : service(138, "bdMatchMaking2")
|
||||
{
|
||||
this->register_task(1, &bdMatchMaking2::unk1);
|
||||
@ -47,5 +46,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdMatchMaking2 final : public service
|
||||
{
|
||||
public:
|
||||
@ -15,5 +14,4 @@ namespace demonware
|
||||
void unk5(service_server* server, byte_buffer* buffer) const;
|
||||
void unk16(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdPresence::bdPresence() : service(103, "bdPresence")
|
||||
{
|
||||
this->register_task(1, &bdPresence::unk1);
|
||||
@ -23,5 +22,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdPresence final : public service
|
||||
{
|
||||
public:
|
||||
@ -12,5 +11,4 @@ namespace demonware
|
||||
void unk1(service_server* server, byte_buffer* buffer) const;
|
||||
void unk3(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdProfiles::bdProfiles() : service(8, "bdProfiles")
|
||||
{
|
||||
this->register_task(3, &bdProfiles::unk3);
|
||||
@ -15,5 +14,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdProfiles final : public service
|
||||
{
|
||||
public:
|
||||
@ -11,5 +10,4 @@ namespace demonware
|
||||
private:
|
||||
void unk3(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdRichPresence::bdRichPresence() : service(68, "bdRichPresence")
|
||||
{
|
||||
this->register_task(1, &bdRichPresence::unk1);
|
||||
@ -23,5 +22,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdRichPresence final : public service
|
||||
{
|
||||
public:
|
||||
@ -12,5 +11,4 @@ namespace demonware
|
||||
void unk1(service_server* server, byte_buffer* buffer) const;
|
||||
void unk2(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdStats::bdStats() : service(4, "bdStats")
|
||||
{
|
||||
this->register_task(1, &bdStats::unk1);
|
||||
@ -47,5 +46,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdStats final : public service
|
||||
{
|
||||
public:
|
||||
@ -15,5 +14,4 @@ namespace demonware
|
||||
void unk8(service_server* server, byte_buffer* buffer) const;
|
||||
void unk11(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdStorage final : public service
|
||||
{
|
||||
public:
|
||||
@ -22,5 +21,4 @@ namespace demonware
|
||||
|
||||
static std::string get_user_file_path(const std::string& name);
|
||||
};
|
||||
|
||||
} // namespace demonware
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdUNK104::bdUNK104() : service(104, "bdUNK104")
|
||||
{
|
||||
this->register_task(1, &bdUNK104::unk1);
|
||||
@ -15,5 +14,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdUNK104 final : public service
|
||||
{
|
||||
public:
|
||||
@ -11,5 +10,4 @@ namespace demonware
|
||||
private:
|
||||
void unk1(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdUNK63::bdUNK63() : service(63, "bdUNK63")
|
||||
{
|
||||
//this->register_task(6, "unk6", &bdUNK63::unk6);
|
||||
@ -15,5 +14,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdUNK63 final : public service
|
||||
{
|
||||
public:
|
||||
@ -11,5 +10,4 @@ namespace demonware
|
||||
private:
|
||||
void unk(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
bdUNK80::bdUNK80() : service(80, "bdUNK80")
|
||||
{
|
||||
this->register_task(42, &bdUNK80::unk42);
|
||||
@ -55,5 +54,4 @@ namespace demonware
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
class bdUNK80 final : public service
|
||||
{
|
||||
public:
|
||||
@ -16,5 +15,4 @@ namespace demonware
|
||||
void unk165(service_server* server, byte_buffer* buffer) const;
|
||||
void unk193(service_server* server, byte_buffer* buffer) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ namespace steam
|
||||
{
|
||||
steam_id id{};
|
||||
id.bits = auth::get_guid();
|
||||
printf("STEAMBITS: %llu\n", id.bits);
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@ -129,7 +128,9 @@ namespace steam
|
||||
|
||||
unsigned long long user::RequestEncryptedAppTicket(void* pUserData, int cbUserData)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("[steam_api]: [user]: request encrypted app ticket\n");
|
||||
#endif
|
||||
// Generate the authentication ticket
|
||||
const auto id = this->GetSteamID();
|
||||
|
||||
@ -154,7 +155,9 @@ namespace steam
|
||||
|
||||
bool user::GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("[steam_api]: [user]: sending encrypted app ticket\n");
|
||||
#endif
|
||||
if (cbMaxTicket < 0 || auth_ticket.empty()) return false;
|
||||
|
||||
const auto size = std::min(size_t(cbMaxTicket), auth_ticket.size());
|
||||
|
Loading…
Reference in New Issue
Block a user