The name may seem obvious, but what exactly are dedicated servers, and what applications are best for this hosting type? In this article, we will explain what a dedicated server is, how it works, dedicated server hardware, factors to consider when choosing a dedicated server, and dedicated server use cases. If (!this.m_factions.IsLeader(senderId) & !( you research various hosting options, you will come across a variety of hosting types such as VPS, As you research various hosting options, you will come across various hosting types, such as VPS, Hybrid Servers, Cloud, and Dedicated Servers. If (!this.m_factions.IsLeader(senderId) & !((senderId))) Sadly this switch does not consider the message beeing sent by the server and just blocks all requests if senderId (here always 0) is not the founder of the faction to changeĬase MyFactionStateChange.SendPeaceRequest:Ĭase MyFactionStateChange.CancelPeaceRequest:Ĭase MyFactionStateChange.FactionMemberAcceptJoin:Ĭase MyFactionStateChange.FactionMemberKick:Ĭase MyFactionStateChange.FactionMemberPromote:Ĭase MyFactionStateChange.FactionMemberDemote: Now FactionStateChangeRequest triggers and calls CheckFactionStateChange as first check. MyMultiplayer.RaiseStaticEvent((IMyEventOwner s) => new Action(MyFactionCollection.FactionStateChangeRequest), action, fromFactionId, toFactionId, playerId,, default(EndpointId)) SendFactionChange(MyFactionStateChange.RemoveFaction, factionId, factionId, 0L) I think i might have located the problem: If that works then any client can effectively tell the server to cause any factions to go to war, which is a security hole. Optional, check faction status with /relation abc civ2 - it shows that info from both server side and client side.Īlso another optional thing you can check (I didn't test it, I was thinking about the possibility just now) is to see if you can cause war between civ1 and civ2 from your client. Check status in the factions window, you should see that there's no war between you and Civilian2.ħ. Create a faction with ABC tag (not part of the issue, just to replicate faster).Ĥ. I also replicated this, at least with DeclareWar, it can't be used from DS side.Īnd why is this an issue you may wonder? Because server needs to be able to change faction statuses without needing a client to act as a messenger, that makes it also a security hole.ģ. Only the client will trigger the FactionStateChanged event on the server. ![]() You will notice that the FactionStateChanged event is never triggered when using the server directly. The blue text was not present in the server message because the server failed to process the faction status change, so the FactionStateChanged event was never triggered.Ĥ) This can be repeated with war declaration as well using "/sfm serverWar Tag1 Tag2" or "/sfm clientWar Tag1 Tag2". The messages displayed show that the server first acknowledges the faction change request (blue text), the client messages are displayed (red text), then the client is updated with the new faction state (blue text again). Check the faction tab and you will see that instead of hostile, you are now neutral with "CIVL". Check the faction tab and you will see no actual faction relation changes (will still be hostile at this point) - this code is run on the DS.ģ) Enter "/sfm clientResetFactions" in chat, notice the messages displayed now (different from step 2). If the client invokes the above methods, the server will acknowledge the call, change faction states appropriately, and report those states back to the client.ĭownload the mod to a dedicated server (must be dedicated, cannot be SP or local MP)ġ) Enter "/sfm factionStatus" in chat - this will show you your current status to the default "friendly" faction (should be hostile at this point)Ģ) Enter "/sfm serverResetFactions" in chat, notice the messaged displayed. I wrote the following mod to demonstrate this issue: any of the above methods are invoked on the dedicated server, the server ignores the call and is never triggered. methods can be utilized on the client connection, which will then sync to the server, but cannot be invoked directly on the server. ![]() Dedicated Servers are ignoring the calls to at least the following faction related methods:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |