Some more mods I put in play. Since location 2 of RAM is not utilized as identified in my previous post, instead of just using a singular value to represent something like I had there, I moved to using the individual bits of that location for tracking SYSOP In/Out (bit 1) and now BBS Open or Closed (bit 2). I did the following modifications and they are working well. Please Note: "BBS Closed" is a different meaning here than it is for the already embedded code of Color 64 - in this instance, I wanted a feature that would allow me to temporarily halt operations to pull my disk(s) for things like moving uploads around, or loading up the disks on my other 64. This temporarily rejects calls and halts file i/o operations that would cause a critical error with the BBS; mainly the caller log and routine variable save. When the sysop hits the BBS CLOSE key again, everything opens back up for operation.
The BBS Open/Close mod is particularly useful for people like me that run off an SD2IEC drive and you need to pull the card for whatever reason.
The code below will toggle a SYSOP IN/OUT flag with <left arrow> and will Accept or Reject calls using <up arrow>
Within below, if I denote something with <SOMETHING>, I am representing a commodore key that can't be replicated in this post. <britishpound> would be ... you guessed it (hopefully), the funky L on your C64 keyboard.
ALWAYS backup your files before performing these mods. I'm error prone. Don't trust me LOL. Usually I just copy the original code file with an "r" in front of it before I modify. so like <checkmark>rbbs.init 8100
1: bbs.init
As in my previous post, line number 12510 is going to get moved. to make room, I'm moving it to line 12518.
First:
- Renumber line 12510 to 12518. Then, renumber line 12515 to 12519.
then...
Enter:
12510 geta$:ifa$="<left arrow>"andpeek(2)and1thenpoke2,peek(2)and254:goto12518 <--turns off bit 1 (sysop out)
12511 ifa$="<left arrow>"thenpoke2,peek(2)or1 <--turns on bit 1 (Sysop in)
12513 ifa$="<up arrow>"andpeek(2)and2thenpoke2,peek(2)and253:goto12518 <--turns off bit 2 (BBS Closed)
12514 ifa$="<up arrow>"thenpoke2,peek(2)or2 <--turns on bit 2 (BBS Open)
For line 12518, remove GET statement and resume with the rest of the normal code with:
12518 ifa$<"<REVERSE CAPITAL E>"ora$>"<REVERSE CAPITAL L>"then12040:<britishpound>poke53280,.
So line 12519 should be Disk Error print statement, 12520 and 12530 should be menu display items.
For status display in bbs.init:
Enter:
12061 print"<home><down 22 times>Sysop: ";
12062 ifpeek(2)and1thenprint"In ";:<britishpound>print"Out "; <--be sure to include space in quotes
12063 print" Board Status: ";:ifpeek(2)and2thenprint"Open ":<britishpound>print"Closed "
Line 12065 now resumes normal code (ifm3andpeek(653)=4........)
We have to ensure critical file operations are kept to minimum since BBS is "down". To do this, we modify code section at 9820 to inhibit saving variables, and at code section starting at 28665 to inhibit saving caller log:
First:
- Renumber line 9820 to 9821.
Then Enter for 9820:
9820 ifpeek(2)and2then9821:<britishpound>close8:return
and... Finally, at line 28665-28669....
28665 - leave alone
Renumber line 28667 to 28669
Enter:
28667 ifpeek(2)and2goto28669
28668 return
Finally, at code section starting at 12112, we are going to have a small routine that will print out to the modem user that BBS is closed and then immediately return operations to WFC screen when a call is received
At line 12112, we are going to do the following:
- Renumber 12112 to 12115, and modify the code of "then12112" to "then12115"
- Renumber 12114 to 12116
- Renumber 12115 to 12118
Add:
12112 ifpeek(2)and2then12115
12113 '"<your modem message saying BBS is closed>" <-- Note, we are using tick mark (')
12114 '"<more message if you need it":goto12250 so this doesn't print to local screen
... and you'll see your original 8.1 code we renumbered earlier....
12115 gosbu12950:ift+120>tithen12115 <-- the "then12115" was modified due to move
12116 .26:!47,.:....and rest of original code
There is one downside; BBS will not show any ill effects if disks remain in place when BBS is in closed status. However, if you remove a disk where your screens are stored, WFC will still try to load after a call is received (and rejected) and will not be able to access the WFC sequential file, so it will fail to display. This will create a blank screen, except for modem information. This DOES NOT cause a critical error; the BBS is still working!! When you are done with what you are doing, you can reinsert your disks and press "<up arrow>" and BBS will be back in operation, though the WFC screen will still remain absent. When this occurs, my workaround to refresh the screen until I can properly code it is to just F1 to Sysop local menu, go to DOS (F7), and then exit back out. I tried to initially put in code around the WFC area to avoid this, but it was a pain in the butt, and I decided to just live with it.
bbs.msgs
This only deals with SYSOP in/out status. If the board is closed, file bbs.msgs is never getting loaded (or shouldn't unless you do it by logging in locally while BBS is closed). As in my previous post, line change starts at line 50, but I cleaned up process as well a little.
Here we will modify line 50 to read:
50 iflmthen51:<britishpound>goto55
Add:
51 f$="<checkmark>welcome2":gosub205:ifpeek(2)and1thenf$="<checkmark>sysopin":goto54
53 f$="<checkmark>sysopout"
54 gosub205:gosub13523:gosub8510:gosub9005
and then resume original 8.1 code with...
55 goto13100
Also, for being able to do this remotely, added a mod to bbs.xfer. Just note, if you close the BBS remotely, you wont be able to get back in!!
bbs.xfer
Add following lines:
19100 ifpeek(2)and1thenpoke2,peek(2)and254:#"Sysop is now out!":return
19101 poke2,peek(2)or1:#"Sysop is now in!":return
19120 ifpeek(2)and2thenpoke2,peek(2)and253:#"BBS is now closed.":return
19121 poke2,peek(2)or2:#"BBS is now open!":return
and then add.....
22103 ifi$="sysop"thengosub19100:goto22020
22104 ifi$="bbs"thengosub19120:goto22020