Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository

This commit is contained in:
Akkadius
2020-06-29 00:40:27 -05:00
34 changed files with 1366 additions and 509 deletions
+11 -6
View File
@@ -508,14 +508,19 @@ int main(int argc, char** argv) {
zoneserver_list.UpdateUCSServerAvailable();
});
server_connection->OnConnectionRemoved("UCS", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogInfo("Removed UCS Server connection from [{0}]",
connection->GetUUID());
server_connection->OnConnectionRemoved(
"UCS", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogInfo("Connection lost from UCS Server [{0}]", connection->GetUUID());
UCSLink.SetConnection(nullptr);
auto ucs_connection = UCSLink.GetConnection();
zoneserver_list.UpdateUCSServerAvailable(false);
});
if (ucs_connection->GetUUID() == connection->GetUUID()) {
LogInfo("Removing currently active UCS connection");
UCSLink.SetConnection(nullptr);
zoneserver_list.UpdateUCSServerAvailable(false);
}
}
);
server_connection->OnConnectionIdentified("WebInterface", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogInfo("New WebInterface Server connection from [{2}] at [{0}:{1}]",
+7 -2
View File
@@ -19,7 +19,7 @@ void UCSConnection::SetConnection(std::shared_ptr<EQ::Net::ServertalkServerConne
LogInfo("Incoming UCS Connection while we were already connected to a UCS");
connection->Handle()->Disconnect();
}
connection = inStream;
if (connection) {
connection->OnMessage(
@@ -32,7 +32,12 @@ void UCSConnection::SetConnection(std::shared_ptr<EQ::Net::ServertalkServerConne
);
}
m_keepalive.reset(new EQ::Timer(5000, true, std::bind(&UCSConnection::OnKeepAlive, this, std::placeholders::_1)));
m_keepalive.reset(new EQ::Timer(1000, true, std::bind(&UCSConnection::OnKeepAlive, this, std::placeholders::_1)));
}
const std::shared_ptr<EQ::Net::ServertalkServerConnection> &UCSConnection::GetConnection() const
{
return connection;
}
void UCSConnection::ProcessPacket(uint16 opcode, EQ::Net::Packet &p)
+2
View File
@@ -16,6 +16,8 @@ public:
void SendPacket(ServerPacket* pack);
void Disconnect() { if(connection && connection->Handle()) connection->Handle()->Disconnect(); }
void SendMessage(const char *From, const char *Message);
const std::shared_ptr<EQ::Net::ServertalkServerConnection> &GetConnection() const;
private:
inline std::string GetIP() const { return (connection && connection->Handle()) ? connection->Handle()->RemoteIP() : 0; }
std::shared_ptr<EQ::Net::ServertalkServerConnection> connection;
+4
View File
@@ -1252,6 +1252,10 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
case ServerOP_CZSetEntityVariableByGroupID:
case ServerOP_CZSetEntityVariableByRaidID:
case ServerOP_CZSetEntityVariableByGuildID:
case ServerOP_CZTaskAssign:
case ServerOP_CZTaskAssignGroup:
case ServerOP_CZTaskAssignRaid:
case ServerOP_CZTaskAssignGuild:
case ServerOP_WWMarquee:
case ServerOP_DepopAllPlayersCorpses:
case ServerOP_DepopPlayerCorpse: