9 // File System Maintenance
12 accessDownloadFile = 2 // Can Download Files
15 accessCreateFolder = 5
16 accessDeleteFolder = 6
17 accessRenameFolder = 7
22 // accessCloseChat = 12 // Documented but unused?
23 // accessShowInList = 13 // Documented but unused?
28 // accessChangeOwnPass = 18 // Documented but unused?
29 // accessSendPrivMsg = 19 // This doesn't do what it seems like it should do. TODO: Investigate
30 accessNewsReadArt = 20
31 accessNewsPostArt = 21
32 accessDisconUser = 22 // Toggles red user name in user list
33 accessCannotBeDiscon = 23
34 accessGetClientInfo = 24
35 accessUploadAnywhere = 25
37 // accessNoAgreement = 27
38 accessSetFileComment = 28
39 accessSetFolderComment = 29
40 accessViewDropBoxes = 30
43 accessNewsDeleteArt = 33
44 accessNewsCreateCat = 34
45 // accessNewsDeleteCat = 35
46 accessNewsCreateFldr = 36
47 // accessNewsDeleteFldr = 37
50 type accessBitmap [8]byte
52 func (bits *accessBitmap) Set(i int) {
53 bits[i/8] |= 1 << uint(7-i%8)
56 // authorize checks if 64 bit access slice contain has accessBit set
57 // TODO: refactor to use accessBitmap type
58 func authorize(access *[]byte, accessBit int) bool {
59 bits := big.NewInt(int64(binary.BigEndian.Uint64(*access)))
61 return bits.Bit(63-accessBit) == 1