home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / ZREG143.ZIP / COLOR.SRC < prev    next >
Text File  |  1998-02-07  |  3KB  |  134 lines

  1.                        ########## COLOR.SRC ##########
  2.                  ### FOR SETTING CHAT COLOR FOR EACH USER ###
  3.  
  4. !INCLUDE FILE_IO.INC
  5. !INCLUDE SBBSDEFS.INC
  6.  
  7. !DEFINE DATA_LEN 250    # Set Length for Each Entry #
  8.  
  9. INT file offset 
  10. STR blank color
  11.  
  12. fopen file o_rdwr|o_creat|o_denynone "..\exec\zephyr\reg\registry.dat"
  13.  
  14. set blank ""
  15. set offset 0 
  16.  
  17. # Jump to user's block #
  18. copy offset _useron.number
  19. mul offset data_len
  20. sub offset data_len
  21. add offset 183
  22. fset_pos file offset seek_set
  23.  
  24. fread file color 7
  25.  
  26. truncsp color
  27.  
  28. # If color not set then revert to default #
  29. compare color blank
  30. if_true
  31.     goto exit
  32.     end_if
  33.  
  34. strupr color
  35.  
  36. # Set color for chat handle #
  37. compare color "GREEN"
  38. if_true
  39.     replace_text 520 "_g%%-8.8s wh(%%2d)%%c nc%%s"    
  40.     goto exit
  41.     end_if
  42.  
  43. compare color "HGREEN"
  44. if_true
  45.     replace_text 520 "_gh%%-8.8s wh(%%2d)%%c nc%%s"     
  46.     goto exit
  47.     end_if
  48.  
  49. compare color "BLUE"
  50. if_true
  51.     replace_text 520 "_b%%-8.8s wh(%%2d)%%c nc%%s"     
  52.     goto exit
  53.     end_if
  54.  
  55. compare color "HBLUE"
  56. if_true
  57.     replace_text 520 "_bh%%-8.8s wh(%%2d)%%c nc%%s"     
  58.     goto exit
  59.     end_if
  60.  
  61. compare color "RED"
  62. if_true
  63.     replace_text 520 "_r%%-8.8s wh(%%2d)%%c nc%%s"     
  64.     goto exit
  65.     end_if
  66.  
  67. compare color "HRED"
  68. if_true
  69.     replace_text 520 "_rh%%-8.8s wh(%%2d)%%c nc%%s"     
  70.     goto exit
  71.     end_if
  72.  
  73. compare color "CYAN"
  74. if_true
  75.     replace_text 520 "_c%%-8.8s wh(%%2d)%%c nc%%s"     
  76.     goto exit
  77.     end_if
  78.  
  79. compare color "HCYAN"
  80. if_true
  81.     replace_text 520 "_ch%%-8.8s wh(%%2d)%%c nc%%s"     
  82.     goto exit
  83.     end_if
  84.  
  85. compare color "MAGENTA"
  86. if_true
  87.     replace_text 520 "_m%%-8.8s wh(%%2d)%%c nc%%s"     
  88.     goto exit
  89.     end_if
  90.  
  91. compare color "PINK"
  92. if_true
  93.     replace_text 520 "_mh%%-8.8s wh(%%2d)%%c nc%%s"     
  94.     goto exit
  95.     end_if
  96.  
  97. compare color "YELLOW"
  98. if_true
  99.     replace_text 520 "_yh%%-8.8s wh(%%2d)%%c nc%%s"     
  100.     goto exit
  101.     end_if
  102.  
  103. compare color "BROWN"
  104. if_true
  105.     replace_text 520 "_y%%-8.8s wh(%%2d)%%c nc%%s"     
  106.     goto exit
  107.     end_if
  108.  
  109. compare color "WHITE"
  110. if_true
  111.     replace_text 520 "_nh%%-8.8s wh(%%2d)%%c nc%%s"     
  112.     goto exit
  113.     end_if
  114.  
  115. compare color "GRAY"
  116. if_true
  117.     replace_text 520 "_n%%-8.8s wh(%%2d)%%c nc%%s"     
  118.     goto exit
  119.     end_if
  120.  
  121. compare color "BLACK"
  122. if_true
  123.     replace_text 520 "_kh%%-8.8s wh(%%2d)%%c nc%%s"     
  124.     goto exit
  125.     end_if
  126.  
  127. # Fall though to originial color #
  128. revert_text 520
  129.  
  130. :Exit
  131. FCLOSE FILE
  132.  
  133. ### END OF COLOR.SRC ###
  134.