X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/a0241c250de01f32eacba2afee3f7d5cea30b8e5..3c9b1dcdf40474396a3b035d548417b84a123164:/hotline/transaction_handlers.go?ds=inline diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index ea46499..2c5a930 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -821,11 +821,8 @@ func (cc *ClientConn) notifyNewUserHasJoined() (res []Transaction, err error) { } func HandleTranAgreed(cc *ClientConn, t *Transaction) (res []Transaction, err error) { - bs := make([]byte, 2) - binary.BigEndian.PutUint16(bs, *cc.Server.NextGuestID) - + cc.Agreed = true cc.UserName = t.GetField(fieldUserName).Data - *cc.ID = bs *cc.Icon = t.GetField(fieldUserIconID).Data options := t.GetField(fieldOptions).Data @@ -1143,7 +1140,7 @@ func HandlePostNewsArt(cc *ClientConn, t *Transaction) (res []Transaction, err e newArt := NewsArtData{ Title: string(t.GetField(fieldNewsArtTitle).Data), Poster: string(cc.UserName), - Date: NewsDate(), + Date: toHotlineTime(time.Now()), PrevArt: []byte{0, 0, 0, 0}, NextArt: []byte{0, 0, 0, 0}, ParentArt: append([]byte{0, 0}, t.GetField(fieldNewsArtID).Data...), @@ -1402,9 +1399,9 @@ func HandleSetClientUserInfo(cc *ClientConn, t *Transaction) (res []Transaction, return res, err } -// HandleKeepAlive response to keepalive transactions with an empty reply -// HL 1.9.2 Client sends keepalive msg every 3 minutes -// HL 1.2.3 Client doesn't send keepalives +// HandleKeepAlive responds to keepalive transactions with an empty reply +// * HL 1.9.2 Client sends keepalive msg every 3 minutes +// * HL 1.2.3 Client doesn't send keepalives func HandleKeepAlive(cc *ClientConn, t *Transaction) (res []Transaction, err error) { res = append(res, cc.NewReply(t))