]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/field.go
patch: v0.2.3
[rbdr/mobius] / hotline / field.go
index 161a9b29007b14199e3905f763782071abd27779..26012afefcb6e61d17064e5d0d5d5a169c79f348 100644 (file)
@@ -16,7 +16,8 @@ const fieldRefNum = 107
 const fieldTransferSize = 108
 const fieldChatOptions = 109
 const fieldUserAccess = 110
 const fieldTransferSize = 108
 const fieldChatOptions = 109
 const fieldUserAccess = 110
-const fieldUserAlias = 111
+
+// const fieldUserAlias = 111 TODO: implement
 const fieldUserFlags = 112
 const fieldOptions = 113
 const fieldChatID = 114
 const fieldUserFlags = 112
 const fieldOptions = 113
 const fieldChatID = 114
@@ -87,34 +88,3 @@ func NewField(id uint16, data []byte) Field {
 func (f Field) Payload() []byte {
        return concat.Slices(f.ID, f.FieldSize, f.Data)
 }
 func (f Field) Payload() []byte {
        return concat.Slices(f.ID, f.FieldSize, f.Data)
 }
-
-type FileNameWithInfo struct {
-       Type       string // file type code
-       Creator    []byte // File creator code
-       FileSize   uint32 // File Size in bytes
-       NameScript []byte // TODO: What is this?
-       NameSize   []byte // Length of name field
-       Name       string // File name
-}
-
-func (f FileNameWithInfo) Payload() []byte {
-       name := []byte(f.Name)
-       nameSize := make([]byte, 2)
-       binary.BigEndian.PutUint16(nameSize, uint16(len(name)))
-
-       kb := f.FileSize
-
-       fSize := make([]byte, 4)
-       binary.BigEndian.PutUint32(fSize, kb)
-
-       return concat.Slices(
-               []byte(f.Type),
-               f.Creator,
-               fSize,
-               []byte{0, 0, 0, 0},
-               f.NameScript,
-               nameSize,
-               []byte(f.Name),
-       )
-
-}