1
This commit is contained in:
parent
69df47f48e
commit
3a39acfd9b
@ -39,12 +39,12 @@ func IsValidSessionId(accountId string, sessionId string, key string) bool {
|
|||||||
return q5.Md5Str(accountId + key + registerTime + sessionCreateTime) == md5Str
|
return q5.Md5Str(accountId + key + registerTime + sessionCreateTime) == md5Str
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExtractRegisterTimeFromSessionId(sessionId string) int32 {
|
func ExtractRegisterTimeFromSessionId(sessionId string) int64 {
|
||||||
tmpStrings := strings.Split(sessionId, "_")
|
tmpStrings := strings.Split(sessionId, "_")
|
||||||
if len(tmpStrings) < 4 {
|
if len(tmpStrings) < 4 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return new(q5.XValue).SetString(tmpStrings[1]).GetInt32()
|
return new(q5.XValue).SetString(tmpStrings[1]).GetInt64()
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExtractGameIdFromAccountId(accountId string) int32 {
|
func ExtractGameIdFromAccountId(accountId string) int32 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user