InviteCode
Invitation System
Invitation system allows the instance host or anyone with the permissions to do so can generate a random UUID and pass the invitation to someone like a friend or a family member. That client can then use the join_server message included with the invite code that they got, once the code has been used it will allow the client entrance to the session even if the session is whitelisted or locked. It cannot bypass bans, session being full or session password locked.
What does an invite code look like?
It will look like this "2ea7df82-a4ec-40e5-8258-9e1a992f52f2" but an upcoming feature may allow users to customize their own generated code which will become handy for games/applications to use their own random generator.
Invite codes are not permanent!
If a limit use is not defined then it will default the use to being a "one time use" code meaning it will automatically self-destruct once it has been used. Make sure to define the limit use to 5 if your inviting 5 friends over.
Packet Information for Creating an invite code.
- {"msg":"CreateInvite", "instance_guid":"My server id here","limitUse":1, "role_id":"role name here"}
The server receives this packet and responds back to the client who requested the message to them.
- {"MSG":"Invite_Created", "Code":"2ea7df82-a4ec-40e5-8258-9e1a992f52f2", "Limits":1}
Packet Information for Deleting an invite code.
- {"msg":"DeleteInvite", "instance_guid":"My server id here", "invite_code":"2ea7df82-a4ec-40e5-8258-9e1a992f52f2", "role_id":"role name here"}
The server receives this packet and deletes the invite code. The server responds back tot he client who requested the message to them.
- {"MSG":"Invite_Deleted","Code":"2ea7df82-a4ec-40e5-8258-9e1a992f52f2"}