MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / OnServerUserMessage

Function OnServerUserMessage

engine/Poseidon/Network/NetworkServer.cpp:856–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854 NetworkCommandMessage answer;
855 answer.type = NCMTLogged;
856 answer.content.Write(&_admin, sizeof(_admin));
857 SendMsg(player, &answer, NMFGuaranteed);
858
859 if (_mission[0] == '?' && _mission[1] == 0)
860 {
861 NetworkCommandMessage answer;
862 answer.type = NCMTVoteMission;
863 AddMissionList(answer);
864 SendMsg(player, &answer, NMFGuaranteed);
865 }
866
867 UpdateAdminState();
868 }
869 }
870 break;
871 }
872}
873
874void OnServerUserMessage(int from, char* buffer, int bufferSize, void* context)
875{
876 NetworkServer* server = (NetworkServer*)context;
877
878 // A datagram must be long enough to contain its trailing CRC int; otherwise the
879 // size below would go negative. Drop it.
880 if (bufferSize < (int)sizeof(int))
881 {

Callers

nothing calls this directly

Calls 2

CRCMethod · 0.80
DecodeMessageMethod · 0.80

Tested by

no test coverage detected