home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / UTILITY / EXMT-TXT.ARJ / EXMT-TXT.MOD
Text File  |  1992-03-05  |  5KB  |  130 lines

  1. 1Zaphod Beeblebrox #1 @62500
  2. 77March 3, 19920 at 712:31:41pm00
  3. This was posted somewhere a while back.. near the end of last year.  It will
  4. work with 4.20.  It's a list of all exemptions and how to come up with
  5. individual ones when programming (an explanation of bit-wise ands and other
  6. things)
  7.  
  8.  
  9. 1  P/C Ratio
  10. 2  Time
  11. 3  Time/ P/c Ratio
  12. 4  All
  13. 5  All,Ratio
  14. 6  All,Time
  15. 7  All,Time,P/C
  16. 8  Post
  17. 9  Post,Ratio
  18. 10 Post,Time
  19. 11 Post,Time,Ratio
  20. 12 Post,All
  21. 13 Post,All,Ratio
  22. 14 Post,All,Time
  23. 15 Post,All,Time,Ratio
  24. 16 Delete
  25. 17 Delete,Ratio
  26. 18 Delete,Time
  27. 19 Delete,Time,Ratio
  28. 20 Delete,All
  29. 21 Delete,All,Ratio
  30. 22 delete,all,time
  31. 23 delete,all,time,ratio
  32. 24 delete,post
  33. 25 delete,post,ratio
  34. 26 delete,post,time
  35. 27 delete,post,time,ratio
  36. 28 delete,post,all
  37. 29 delete,post,all,ratio
  38. 30 delete,post,all,time
  39. 31 delete,post,all,time,ratio
  40.  
  41.  
  42. 6[4Filo's Note6]0  I do not believe all of those will work without
  43. doing some modification to the source code.
  44.  
  45. Ok...Here is a full description of user exemptions.
  46.  
  47. The exemptions are:
  48. EXEMPTION               HEX-VALUE       BINARY-VALUE    DECIMAL-VALUE
  49. exempt_ratio            0x01            00001            1
  50. exempt_time             0x02            00010            2
  51. exempt_all              0x04            00100            4
  52. exempt_post             0x08            01000            8
  53. exempt_delete           0x10            10000           16
  54.  
  55. The key value is the binary-value in that if you notice for each exemption
  56. there is a 1 in only 1 space.  Now when you want one of your users to
  57. be exempt from something, you put in their exemption a decimal-value
  58. which the BBS will take and &(that does a bit-wise and or an and on the
  59. binary level) and returns either a non-zero or a zero for true and false
  60. respectivly.  Here is how a bit-wise and is done.
  61.  
  62. If you are given the values 10101 and 01100 and you use & on them it will get:
  63.         10101
  64.        &01100
  65.        ------
  66.         00100
  67. Only where there are 2 1's will it make a 1, otherwise it will be 0.  That
  68. applies to the BBS in that if you want a user to be exempt from deletion
  69. you will notice in the auto_delete it uses & with thisuser.exempt and
  70. exempt_delete.  So you will have to have a number which has a binary 1
  71. in the same plae as exempt_delete to make it a non-zero number and thus
  72. being exempt from deletion.
  73.  
  74. exempt delete is 10000, so you will need a value which has 10000 or at
  75. least 16 when you enter the user exemption.
  76.  
  77. Now if you want your user exempt from different things, just put a 1 in
  78. the corresponding space:
  79.  
  80.                 00000
  81.                 |||||
  82.                 ||||exempt_ratio
  83.                 |||exempt_time
  84.                 ||exempt_all
  85.                 |exempt_post
  86.                 exempt_delete
  87. So, if you wanted to have your user exempt from the ratio and posting,
  88. the binary number you would have would be:
  89.                 01001
  90. Which is 9 in decimal and what you would enter in your user exemption
  91. space.  Here is a listing of all the possible combinations and their
  92. equivelant meaning and decimal number.
  93.  
  94. ------------------------------------------------------------------------------
  95.  Hex   # for      Meaning                       ^
  96.   #     user                                    |
  97.                                                 |
  98. 00000   0       No exemptions                   |
  99. 00001   1       ratio                           |
  100. 00010   2       time                            |
  101. 00011   3       time,ratio                      |
  102. 00100   4       all                             |
  103. 00101   5       all,ratio                       |
  104. 00110   6       all,time                        |
  105. 00111   7       all,time,ratio             STOCK WWIV
  106. 01000   8       post                            |
  107. 01001   9       post,ratio                      |
  108. 01010   10      post,time                       |
  109. 01011   11      post,time,ratio                 |
  110. 01100   12      post,all                        |
  111. 01101   13      post,all,ratio                  |
  112. 01110   14      post,all,time                   |
  113. 01111   15      post,all,time,ratio             V
  114. ------------------------------------------------------------------------------
  115. 10000 16 delete 10001   17      delete,ratio
  116. 10010   18      delete,time
  117. 10011   19      delete,time,ratio
  118. 10100   20      delete,all
  119. 10101   21      delete,all,ratio
  120. 10110   22      delete,all,time
  121. 10111   23      delete,all,time,ratio
  122. 11000   24      delete,post
  123. 11001   25      delete,post,ratio       (MY visiting sysops)
  124. 11010   26      delete,post,time
  125. 11011   27      delete,post,time,ratio
  126. 11100   28      delete,post,all
  127. 11101   29      delete,post,all,ratio
  128. 11110   30      delete,post,all,time
  129. 11111   31      delete,post,all,time,ratio      /*SYSOP!!!*/
  130.