citadel style bbs for plan 9, written in rc
hg clone https://code.9front.org/hg/9bbs
9bbs is started by a listen(8)
script that runs on an arbitrary port. The example files included
with this distribution are setup to run on port 666, but may be
modified to suit. The following instructions assume that a listener
is already scanning the directory
/rc/bin/service (true by default
for cpu servers). In this scenario, the 9bbs script will be run as
none, which has special properties limiting its access to
system resources. Run 9bbs as any user other than
your own risk. WARNING: Because user
none can only read and
write files that are world-accessible, anyone with access to the
file system will be able to read and write files under
src/tcp666 to reflect the location of the 9bbs files on
your system, and set any desired options. Edit
etc/welcome according to taste.
Next, build and install the programs:
cd 9bbs/src mk install cd .. mk log mk perms # user who runs this must be a member of group none
Note: 9bbs uses a modified copy of the Plan 9 pager,
p(1). It is identical in all ways to the
original except that the
! command for issuing shell commands has been
removed. The resulting np binary is copied to
tcp666 script is copied to
/rc/bin/service/, and a log file is created
/sys/log/9bbs. All other 9bbs files remain within the 9bbs
All of that completed, 9bbs will now answer telnet connections on port 666.
Suggested: Read the source.
The following commands have been implemented:
[0-9]+ print specified message b back C change password d [...] delete message D [...] view, set message delimiter >D truncate message delimiter e enter message E [...] view, set editor (choices: sam, simple) f jump to first message g [...] list rooms with unread messages, go to specified room gr list ten most recently active rooms h, help print this help message k [...] print roomlist or grep for specified regexp l jump to last message L [...] view, set number of lines to print before engaging pager (enter to continue, q to quit) n next p, re [...] print message with minimal headers P [...] print message with full headers r [...] reply to message q quit S [...] view, set signature >S truncate signature t print current date and time u list users w who is online wr list ten most recently active users W [...] view, set line wrap width y synchronize message list for current room z mark all messages (on the entire bbs) as read " [...] print message in quoted form, suitable for reply ? print debug information
A room is a directory somewhere under
rooms/ that contains at least
one numbered message file. An example room has been included in the
To create a room:
cd 9bbs ./bin/mkroom roomname
Note: Rooms may be nested.
The message format is as follows:
To: lobby Date: Wed, 31 Dec 1969 19:00:01 EST X-Date-N: 1 This is a placeholder message created to bootstrap the system.
g [room]/[n] to print message
Mainly for announcements.
echo subscribe | mail firstname.lastname@example.org
After you’re subscribed, messages will arrive from, and may be sent to, email@example.com.
echo unsubscribe | mail firstname.lastname@example.org
http://osuny.bell-labs.co - telnet port 666, ssh port 999
http://9til.de - telnet port 999