# Lobby2Commands
[Lobby2Plugin]

Commands that can be sent to Lobby2Server from Lobby2Client. More...

## Classes

struct | RakNet::Lobby2Message
| A Lobby2Message encapsulates a networked function call from the client. More...
struct | RakNet::Platform_Startup
| Platform specific startup. Unused on the PC. More...
struct | RakNet::Platform_Shutdown
| Platform specific startup. Unused on the PC. More...
struct | RakNet::System_CreateDatabase
| Create all tables and stored procedures on a system that does not already have them. More...
struct | RakNet::System_DestroyDatabase
| Destroy all tables and stored procedures created with System_CreateDatabase. More...
struct | RakNet::System_CreateTitle
| Each title essentially corresponds to a game. For example, the same lobby system may be used for both asteroids and Pac-man. When logging in, and for some functions, it is necessary to specify which title you are logging in under. This way users playing asteroids do not interact with users playing pac-man, where such interations are game specific (such as ranking). More...
struct | RakNet::System_DestroyTitle
| Destroy a previously added title. More...
struct | RakNet::System_GetTitleRequiredAge
| Get the required age set with System_CreateTitle. More...
struct | RakNet::System_GetTitleBinaryData
| Get the binary data set with System_CreateTitle. More...
struct | RakNet::System_RegisterProfanity

Adds the input strings to a table of profanity. non-unique or empty strings can be ignored. This table will be used internally to ensure that handles and clan names do not contain profanity. Multiple calls add to the table. This table will be used for functions that take a user-defined string that is highly visible, such as clan and user names. It does not need to be checked for emails or message boards. More...

struct | RakNet::System_BanUser

Bans a specific user (will be most likely called by a moderator). Adds the user's primary key to a ban table, along with the name of the moderator, the reason for the ban. Banning is used to prevent the banned user from logging on for some specified duration. A date column should be present and automatically filled in. When bans are expired, the ban can be deleted from the database. However, a separate table should log bans, so that even expired bans can be looked up in case. More...

struct | RakNet::System_UnbanUser
| Unban a user banned with System_BanUser. More...
struct | RakNet::CDKey_Add
| Adds CDKeys to the database. Duplicate CDKeys for a particular title are ignored. CDKeys can be identical for different titles. More...
struct | RakNet::CDKey_GetStatus
| Returns if a CD key was previously added with AddCDKey. More...
struct | RakNet::CDKey_Use

Associates a cd key with a user, such that the cd key cannot be used again. If Client_Login() is called with check cd key as true, then this table will be checked to make sure UserCDKey() was previously called with this user and a valid key. If this user is already associated with a CD Key, add the new key, and use the most recent key. All CD Key usage should be logged in a separate table, including the date used and result. More...

struct | RakNet::CDKey_FlagStolen
| Flags one or more CD keys as stolen. Stolen CD keys will prevent Client_Login() if check cd key is true. They will also prevent these cd keys from being used with CDKey_Use. If this key is already in use by certain users for this particular title, then log this similarly to how CDKey_Use does so. More...
struct | RakNet::Client_Login
| Logon with a previously registered account. More...
struct | RakNet::Client_Logoff
| Logoff, after logging in. More...
struct | RakNet::Client_RegisterAccount

This creates a new account in the database, which can be used in a subsequent call to Login. Most parameters are optional. handle is not optional, and must be unique using case-insensitive compare. emailAddress should be validated to have a sensible format, including an @ sign and a period with a 3 letter extension. allowLoginWithoutEmailAddressValidation is used in Client_Login to potentially disallow logon attempts with unverified email addresses. More...

struct | RakNet::System_SetEmailAddressValidated
| For the client with the given handle, mark a column emailAddressValidated as true or false as appropriate. This is potentially used in Client_Login. More...
struct | RakNet::Client_ValidateHandle
| Looks up in the database if this handle is already in use, subject to the usual constraints of handles. This will be used by the user to quickly check for available handles. More...
struct | RakNet::System_DeleteAccount
| Flags as deleted an account registered with RegisterAccount. Accounts are not actually deleted, only tagged as deleted. More...
struct | RakNet::System_PruneAccounts
| Unused accounts are deleted. This is cascading, such that emails and other tables that reference this key are also deleted. unused accounts are defined as:. More...
struct | RakNet::Client_GetEmailAddress
| Returns the email address associated with a specific handle, invalid handle. This is used for password recovery. More...
struct | RakNet::Client_GetPasswordRecoveryQuestionByHandle
| Returns the passwordRecoveryQuestion associated with handle, invalid handle. More...
struct | RakNet::Client_GetPasswordByPasswordRecoveryAnswer
| Returns the password associated with a handle, if the passwordRecoveryAnswer is correct. More...
struct | RakNet::Client_ChangeHandle
| Changes the handle for a user. More...
struct | RakNet::Client_UpdateAccount
| Will update any or all of the inputs that were previously passed to Client_RegisterAccount, except handle. More...
struct | RakNet::Client_GetAccountDetails
| Get the parameters set with Client_RegisterAccount. More...
struct | RakNet::Client_StartIgnore

Adds the specified user to an ignore list for my user. Recommended to store the primary key of the remote user, both for speed and so if the other use changes their handle it still works. The ignore list is checked for friend invites, emails, and elsewhere where indicated. Ignoring is uni-directional, so if A ignores B, A will block messages from B where appropriate, but B will not immediately block messages from A. More...

struct | RakNet::Client_StopIgnore
| Removes an entry in the database such that myHandle will no longer ignore theirHandle. More...
struct | RakNet::Client_GetIgnoreList
| Returns all users I have ignored. More...
struct | RakNet::Client_PerTitleBinaryStorage
| For each combination of user and title, structures can be stored. More...
struct | RakNet::Friends_SendInvite
| Stores in the database an add friend invite from my handle to their handle. The combination of my handle and their handle must be unique, so you cannot send more than one add friend invite to a single user. Sends an email to their handle the subject, body, and binary data. Note: if myHandle is ignored by theirHandle, then the function fails. See Client_StartIgnore. More...
struct | RakNet::Friends_AcceptInvite

Stores in the database that this user is now my friend. This is bidirectional, which is to say if someone accepts an add friend invite, they are my friend, and I am their friend. Recommended to store by primary key for speed and in case the friend's handle changes. Store in the emails table from my handle to their handle the subject, body, and binary data. Note: if myHandle is ignored by theirHandle, then the function fails. See AddToIgnoreList. More...

struct | RakNet::Friends_RejectInvite
| Removes from the database the pending add friend invite. Operation completes even if ignored. Unless ignored, store in the emails table from my handle to their handle the subject, body, binary data, and procedure type flag. More...
struct | RakNet::Friends_GetInvites
| Returns all invites for this user. More...
struct | RakNet::Friends_GetFriends
| Gets all friends to this user. More...
struct | RakNet::Friends_Remove
| Ends a friendship between two users. Remove from the database the friend entry between my handle and their handle. As with accept add friend invite, this is bidirectional. Either user can terminate the friendship. Store in the emails table from my handle to their handle the subject, body, and binary data, and procedure type flag. More...
struct | RakNet::BookmarkedUsers_Add
| Remembers a user, with a type integer and description for you to use, if desired. More...
struct | RakNet::BookmarkedUsers_Remove
| Remove a user added with BookmarkedUsers_Add. More...
struct | RakNet::BookmarkedUsers_Get
| Returns all users added to BookmarkedUsers_Add. More...
struct | RakNet::Emails_Send

Adds to an emails table from myHandle (store primary key) to recipient handles (store primary key) the specified subject, body, and binary data. Emails are persistent, therefore emails should be stored in a separate table and referenced by the user. Deleting the user does not delete previously send email. Emails should have an automatic timestamp to store when they were created. Email should be flagged as sent=true (boolean), markedRead=true (boolean), deletedBySender=false (boolean), deletedByReciever=false (boolean). More...

struct | RakNet::Emails_Get
| Returns emails as noted. Emails which were marked deleted are not returned. More...
struct | RakNet::Emails_Delete

Deletes an email with a specified ID. This ID is returned in GetEmail and should uniquely identify an email (it's fine to use the primary key). Note: Emails are not actually deleted from the database in this function. This just sets the deletedBySender or deletedByReciever flags. Emails are actually stored in a log recording past emails and sender and receiver primary key. They are not truly destroyed until done so with System_PruneAccounts. More...

struct | RakNet::Emails_SetStatus
| Sets the status flag for an email. This is a property defined by and used by the user. More...
struct | RakNet::Ranking_SubmitMatch
| Will record in the database the results of a match. This will store in the database the the match which is defined by the the match notes, match id, winner and loser participant primary keys, winner and loser participant scores, and binary data. More...
struct | RakNet::Ranking_GetMatches
| Gets matches recorded with Ranking_SubmitMatch ordered from most recent to least recent. Each returned match has all columns submitted to Ranking_SubmitMatch, except binary data, which can be retrieved with Ranking_GetMatchBinaryData. Additionally, each returned match returns the primary key of each match, to be passed to Ranking_GetMatchBinaryData. More...
struct | RakNet::Ranking_GetMatchBinaryData
| Because of the large amount of binary data potentially returned, this function is used to retrieve binary data for a particular match. More...
struct | RakNet::Ranking_GetTotalScore
| When a match is submitted with Ranking_SubmitMatch, the total running score and number of matches played for each player for each game title and game mode combination should be recorded. Because matches can be pruned wth PruneMatches(), the total score sum and number of scores submitted should be stored, rather than summed up from prior submitted matches. More...
struct | RakNet::Ranking_WipeScoresForPlayer
| Resets the sum of all submitted scores to 0, the number of scores submitted to 0. More...
struct | RakNet::Ranking_WipeMatches
| Deletes all matches submitted with submit match. Also deletes all scores for all players associated with this titleName and gameType (e.g. same thing that WipeScoresForPlayer does, but for all players). More...
struct | RakNet::Ranking_PruneMatches
| Will delete all matches submitted with SubmitMatch over PruneTime days old. Will also prune matches if the total storage space of all matches exceeds PruneSizeMB megabytes in the database. More...
struct | RakNet::Ranking_UpdateRating
| Add or update a rating for a user, in a particular game and game mode. More...
struct | RakNet::Ranking_WipeRatings
| Deletes all ratings for all players for this combination of titleName and gameType. More...
struct | RakNet::Ranking_GetRating
| Get rating for a player. More...
struct | RakNet::Clans_Create
| userHandle updates the clanDescription and clanBinaryData of a clan with the specified clanHandle. userHandle must be the clan leader. More...
struct | RakNet::Clans_SetProperties
| userHandle updates the clanDescription and clanBinaryData of a clan with the specified clanHandle. userHandle must be the clan leader. More...
struct | RakNet::Clans_GetProperties
| Returns clanDescription and clanBinaryData for the given clan. More...
struct | RakNet::Clans_SetMyMemberProperties
| Each member of each clan has the the properties clanMemberDescription and clanMemberBinaryData which default to empty. These properties can be set here, and retrieved via GetClanMemberProperties. More...
struct | RakNet::Clans_GrantLeader
| myPrimaryKey becomes a subleader. newLeaderHandle becomes the leader. An email is sent with Emails_Send() to all members with the specified subject and body More...
struct | RakNet::Clans_SetSubleaderStatus
| Promotes a clan member to a subleader, or demotes a subleader to a regular member. On promotion, email is sent to all members from myPrimary key with the specified subject and body. On demotion, email is sent to all leaders from myPrimary key with the specified subject and body. More...
struct | RakNet::Clans_SetMemberRank
| Lets the clan leader set the rank property for a clan member. More...
struct | RakNet::Clans_GetMemberProperties
| Returns properties for a clan member of a given clan. More...
struct | RakNet::Clans_ChangeHandle
| Renames the clan. Note that this may be called asynchronously, in which case the stored procedure should account for this occuring at the same time as another function that uses the old clan handle. More...
struct | RakNet::Clans_Leave
| Remove user identified by myPrimaryKey from clan identified by clanHandle. More...
struct | RakNet::Clans_Get
| Returns all clans that userHandle is a member of. Clans and clan members should be sorted by name, using ascending or descending sort as specified. More...
struct | RakNet::Clans_SendJoinInvitation

if myPrimaryKey is a leader or subleader of clanHandle, and invitedUserHandle is a valid user not already invited to this clan, add this user to the invite table. The invite table contains the clan, who send the invite, and who the invite was sent to, and when it was sent. Invites expire after expiration time in seconds. Also, use Emails_Send() to send an email from myPrimaryKey to invitedUserHandle with the specified subject and body. More...

struct | RakNet::Clans_WithdrawJoinInvitation
| if myPrimaryKey is a leader or subleader of clanHandle, and invitedUserHandle is a valid user with an invite to this clan, remove this invite. Also, use Emails_Send() to send an email from myPrimaryKey to invitedUserHandle with the specified subject and body. More...
struct | RakNet::Clans_AcceptJoinInvitation
| If myPrimaryKey has an invitation to the specified clan, add him to the clan. Fail on specified output parameters. Use Emails_Send() to send an email from myPrimaryKey to all clan members with the specified subject and body. More...
struct | RakNet::Clans_RejectJoinInvitation
| If we have an open clan invitation, reject it (just delete it from the database). More...
struct | RakNet::Clans_DownloadInvitationList
| Returns all invites sent by Clans_SendJoinInvitation that were not yet acted upon (withdrawn, accepted, rejected). More...
struct | RakNet::Clans_SendJoinRequest
| Function has two forms:. More...
struct | RakNet::Clans_WithdrawJoinRequest
| Withdraws a previously sent clan join request via SendClanJoinRequest. Use Emails_Send() to send an email from myPrimaryKey to the clan leader and all subleaders with the specified subject and body. More...
struct | RakNet::Clans_AcceptJoinRequest
| A clan leader or subleader accepts a join request from requestingUserHandle to this clan. requestingUserHandle joins the clan as a regular member. Use Emails_Send() to send an email from requestingUserHandle to all clan members with the specified subject and body. More...
struct | RakNet::Clans_DownloadRequestList
| Returns all open requests this user has sent to clans, that have not yet acted upon (withdrawn, accepted, rejected, expired). More...
struct | RakNet::Clans_KickAndBlacklistUser

Kicks a user from the clan and/or blacklists a user so they cannot join. Only a clan leader or subleader can perform this operation. The operation can only be performed on members of lower status (leader can perform on subleader or regular member or nonmember, subleader on regular members or nonmember). If a member is banned, they are added to the banned table which contains the member's primary key, which user banned them, and the reason. Email is sent from myPrimaryKey to all leaders if a clan member is banned. Emails is furthermore sent to all clan members if successfully kicked. More...

struct | RakNet::Clans_UnblacklistUser
| Removes a user from the blacklist for this clan. More...
struct | RakNet::Clans_GetBlacklist
| Returns a list of all members blacklisted from this clan. Each element in the list contains the handle of the user that did the ban, who was banned, when the user was banned, and the reason passed to ClanKickAndBlacklistUser. More...
struct | RakNet::Clans_GetMembers
| Returns all clan members for this clan. Each entry returned contains handle, description, binary data, status (leader, regular member, subleader). More...
struct | RakNet::Clans_GetList
| Returns all clans names. More...
struct | RakNet::Clans_CreateBoard
| Creates a new clan board for clan members to post in using AddPostToClanBoard. Clan boards are unique, and are destroyed when the clan is destroyed, or if DestroyClanBoard is called. More...
struct | RakNet::Clans_DestroyBoard
| Success, invalid parameter syntax, myPrimaryKey is not the leader or subleader of clanHandle, unknown myPrimaryKey, unknown clanHandle, unknown clanBoardName. More...
struct | RakNet::Clans_CreateNewTopic
| Each clan has a clan board that only clan members can post to. This adds a topic to the clan board. Posts should reference the primary key of the poster, so that even if the poster chagnes his or her handle, the post author is updated properly. Each post automatically stores the timestamp when it was created. Banned users may not add new posts to the clan board. More...
struct | RakNet::Clans_ReplyToTopic
| Replies to a topic created with Clans_CreateTopic(). If postId references a post within a topic, just add the reply to the last post. Banned users may not add new posts to the clan board. More...
struct | RakNet::Clans_RemovePost
| The clan leader or subleaders may remove posts or topics from a clan board. More...
struct | RakNet::Clans_GetBoards
| Gets clan boards created for clanHandle. Boards are returned if we are a clan member, or if allowPublicReads in Clans_CreateBoard() was passed as false. However, if we are banned from this clan, no boards are returned. More...
struct | RakNet::Clans_GetTopics
| Gets topics (posts that are not replies to other posts, created with Clans_CreateTopic()) for the specified clanHandle and clanBoardName. If we are not a clan member and the clan was created with allowPublicReads==false, then the user is not allowed to read topics. More...
struct | RakNet::Clans_GetPosts
| Gets all posts for a particular topic. If postId is not a topic but is instead a post in a topic, treat it as if the topic postId was passed. If we are not a clan member and the clan was created with allowPublicReads==false, then the user is not allowed to read topics. More...

## Enumerations

enum | RakNet::Lobby2MessageID

## Detailed Description

Commands that can be sent to Lobby2Server from Lobby2Client.

## Enumeration Type Documentation

enum RakNet::Lobby2MessageID

All enumerations for Lobby2Message. Each Lobby2Message has one enumeration