mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
Merge pull request #1210 from ctrlaltca/profile_edit
Profile management
This commit is contained in:
commit
6bf421cc31
24 changed files with 701 additions and 270 deletions
|
|
@ -22,4 +22,5 @@ message ServerInfo_User {
|
|||
optional sint32 server_id = 9 [default = -1];
|
||||
optional uint64 session_id = 10;
|
||||
optional uint64 accountage_secs = 11;
|
||||
optional string email = 12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ message SessionCommand {
|
|||
JOIN_ROOM = 1015;
|
||||
REGISTER = 1016;
|
||||
ACTIVATE = 1017;
|
||||
ACCOUNT_EDIT = 1018;
|
||||
ACCOUNT_IMAGE = 1019;
|
||||
ACCOUNT_PASSWORD = 1020;
|
||||
REPLAY_LIST = 1100;
|
||||
REPLAY_DOWNLOAD = 1101;
|
||||
REPLAY_MODIFY_MATCH = 1102;
|
||||
|
|
@ -110,11 +113,11 @@ message Command_Register {
|
|||
required string password = 2;
|
||||
// Email address of the client for user validation
|
||||
optional string email = 3;
|
||||
// Gender of the user
|
||||
optional ServerInfo_User.Gender gender = 4;
|
||||
// Country code of the user. 2 letter ISO format
|
||||
optional string country = 5;
|
||||
optional string real_name = 6;
|
||||
// Gender of the user
|
||||
optional ServerInfo_User.Gender gender = 4;
|
||||
// Country code of the user. 2 letter ISO format
|
||||
optional string country = 5;
|
||||
optional string real_name = 6;
|
||||
}
|
||||
|
||||
// User wants to activate an account
|
||||
|
|
@ -127,3 +130,28 @@ message Command_Activate {
|
|||
// Activation token
|
||||
required string token = 2;
|
||||
}
|
||||
|
||||
message Command_AccountEdit {
|
||||
extend SessionCommand {
|
||||
optional Command_AccountEdit ext = 1018;
|
||||
}
|
||||
optional string real_name = 1;
|
||||
optional string email = 2;
|
||||
optional ServerInfo_User.Gender gender = 3;
|
||||
optional string country = 4;
|
||||
}
|
||||
|
||||
message Command_AccountImage {
|
||||
extend SessionCommand {
|
||||
optional Command_AccountImage ext = 1019;
|
||||
}
|
||||
optional bytes image = 1;
|
||||
}
|
||||
|
||||
message Command_AccountPassword {
|
||||
extend SessionCommand {
|
||||
optional Command_AccountPassword ext = 1020;
|
||||
}
|
||||
optional string old_password = 1;
|
||||
optional string new_password = 2;
|
||||
}
|
||||
|
|
@ -44,6 +44,8 @@ public:
|
|||
enum LogMessage_TargetType { MessageTargetRoom, MessageTargetGame, MessageTargetChat, MessageTargetIslRoom };
|
||||
virtual void logMessage(const int /* senderId */, const QString & /* senderName */, const QString & /* senderIp */, const QString & /* logMessage */, LogMessage_TargetType /* targetType */, const int /* targetId */, const QString & /* targetName */) { };
|
||||
bool checkUserIsBanned(Server_ProtocolHandler *session, QString &banReason, int &banSecondsRemaining);
|
||||
virtual bool changeUserPassword(const QString & /* user */, const QString & /* oldPassword */, const QString & /* newPassword */) { return true; };
|
||||
virtual QChar getGenderChar(ServerInfo_User_Gender const & /* gender */) { return QChar('u'); };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue