X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/16a4ad707a05df25c9d12b8cc89fb3a9e3be0dba..043c00da52efd5b7d9ef15750945ee55e6f78e7a:/hotline/field.go?ds=inline diff --git a/hotline/field.go b/hotline/field.go index 5f2e873..3378552 100644 --- a/hotline/field.go +++ b/hotline/field.go @@ -23,6 +23,8 @@ const fieldOptions = 113 const fieldChatID = 114 const fieldChatSubject = 115 const fieldWaitingCount = 116 +const fieldBannerType = 152 +const fieldNoServerAgreement = 152 const fieldVersion = 160 const fieldCommunityBannerID = 161 const fieldServerName = 162 @@ -56,10 +58,12 @@ const fieldNewsArtDate = 330 const fieldNewsArtPrevArt = 331 const fieldNewsArtNextArt = 332 const fieldNewsArtData = 333 -const fieldNewsArtFlags = 334 + +// const fieldNewsArtFlags = 334 const fieldNewsArtParentArt = 335 const fieldNewsArt1stChildArt = 336 -const fieldNewsArtRecurseDel = 337 + +// const fieldNewsArtRecurseDel = 337 type Field struct { ID []byte // Type of field @@ -90,3 +94,12 @@ func NewField(id uint16, data []byte) Field { func (f Field) Payload() []byte { return concat.Slices(f.ID, f.FieldSize, f.Data) } + +func getField(id int, fields *[]Field) *Field { + for _, field := range *fields { + if id == int(binary.BigEndian.Uint16(field.ID)) { + return &field + } + } + return nil +}