From 5269e1e4c4a44196839d57fa4e9833536672473a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 4 Apr 2026 14:26:31 +0100 Subject: Add an easier way to get the local Server* object. --- src/inspircd.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5a92907a6..13f65a519 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -403,7 +403,8 @@ void InspIRCd::Cleanup() /* Must be deleted before modes as it decrements modelines */ if (FakeClient) { - delete FakeClient->server; + LocalServer = nullptr; + insp::delete_zero(FakeClient->server); FakeClient->Cull(); } insp::delete_zero(this->FakeClient); @@ -514,6 +515,7 @@ InspIRCd::InspIRCd(int argc, char** argv) // Create the server user for this server this->FakeClient = new FakeUser(Config->ServerId, Config->ServerName, Config->ServerDesc); + this->LocalServer = this->FakeClient->server; // This is needed as all new XLines are marked pending until ApplyLines() is called this->XLines->ApplyLines(); -- cgit v1.3.1-10-gc9f91