Date : 1-3-87 Subject: Changing the number of users in the user log on PBBS Author : Bill Blomgren, St Pete RCP/M Distribution: St. Pete RCP/M... (813) 527-5666 and the Dallas Connection, and other systems that carry pbbs code. I have been working on a program to change the number of users on a PBBS user log for some time. It was a hit or miss thing time wise. I finally got tired of re-inventing the wheel, and looked through the PBBSmnt code, studying the rehash routines. I have come up with two quick patches that will allow you to generate a version (for ONE use only!) of PBBSMNT that will change the size of the user file by doing a re-hash. To make the code as easy to implement as possible, one new equate is added to PBBSHDR, and patched into PBBSMNT in the position indicated. Implementation: 1) Edit your PBBSHDR.MAC and PBBSMNT.MAC files as shown. Change the value for USRS:: to whatever your NEW value will be. Place the Current value into OLDUSR::. 2) Assemble and link PBBSMNT with the new values. At the same time, re-assemble PBBS, and other programs to use the new size. 3) MAKE a backup of the data! 4) Run the temporary version of PBBSMNT once. At the menu, select the Rehash user file command. 5) the system will now generate a hashed user file of the new size. your old file will be left in USERS.BAK 6) IMMEDIATELY DELETE the pbbsmnt program, and change the PBBSHDR file to eliminate the difference between the two user values. Cautions: Make ABSOLUTELY sure that there is enough room in the new file for the number of users if you are shrinking the user file! If you try to fit a size 40 girth into a size 32 pair of pants, you know what will happen. -------------------- The code changes: in PBBSHDR.MAC POSTLV:: DB 3 ; minimum access for posting any message, ; excluding Feedback, the exit file will ; allow the user to leave you a comment. ; 0 = all levels may post ALLLV:: DB 4 ;minimum access for leaving public messages RSTKLV:: DB 2 ;minimum level to enter CP/M if restricted KNOKLV:: DB 4 ;below this gets CP/M question if KNOWON set USRS:: DW 300 ;set to the maximum number of users allowed ; be generous 300 is a good number. (30k file) ; min=50, max = 999 =================> add the following lines OLDUSR:: DW USRS ; this will make the OLDUSR value same as ; current value. Plant a new value here ; for the size of the old user file! <================ ;------------------------------------------------------------------------------ ; In order to provide the capability for PBBS to handle multiple ; message bases (up to 9), you MUST assign a number to NMFLDRS. If ; you want the standard PBBS (single message base) NMFLDRS MUST be set --------------- The code changes for PBBSMNT.MAC This code is found in the rehash routine, and involves the line changed as noted.. HWRT: CALL PUT2 ; null out the record HBMP: LD HL,(RRNO2) ;get record DEC HL ;and drop it by one LD A,H CP 0FFH ;see if any more JP NZ,HWRT ;yes ; CALL PRINT DB 'Done....' DB CR,LF,LF,0 LD HL,USERS2 ; users.bak CALL OPEN LD HL,USRLEN LD (RRSZ),HL ====================vvvvvv===> change this value from USRS LD HL,(OLDUSR) ;start at last record <===================^^^^^^==== ; RDLOOP: PUSH HL CALL PRINT That is all there is to it. It seems simpler to distribute this way. Give me some feedback to say how it goes!.. Bill Blomgren. i