Andromeda's Bulletin Board

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Andromeda's Bulletin Board

@create Local Bulletin Board
@lock Local Bulletin Board==me
&DO_BMAX Local Bulletin Board=$bmax *:@swi [owner(me)]=%#,{@swi [member([lnum(1,100)],%0)]=0,@pemit = That number is out of range. Valid numbers are 1 through 100.,&max me=%0;@pemit %#=[name(me)] max is set to %0.},@pemit %#=You must be the owner to use that feature.
&CREDITS Local Bulletin Board=Coded by Andromeda@Miami by Night
@Desc Local Bulletin Board=This is a local bulletin board parent. To utilize this, follow the instructions for parenting in the Free Code Room, then type 'bhelp' for commands. Don't forget to @desc your new bulletin board appropriately.
&HEADER Local Bulletin Board=[center( Messages on [name(me)] ,78,=)]%r%r #[space(3)]Title[space(45)]Date%r[repeat(-,78)]
&FOOTER Local Bulletin Board=[center( RL: [time()] | IC: [vtime()] ,78,=)]
&DO_BPOST Local Bulletin Board=$bpost *=*:@swi [gte([words([u(me/message_list)])],50)]=0,{&msg_[u(me/next)]_title me=[switch([gt([strlen(%0)],50)],1,{[mid(%0,0,50)]},%0)];&msg_[u(me/next)]_date me=RL: [time()] | IC: [vtime()];&msg_[u(me/next)]_author_db me=%#;&msg_[u(me/next)]_author_name me=[name(%#)];&msg_[u(me/next)]_text me=%1;&message_list me=[setunion([u(me/message_list)],[u(me/next)])];&next me=[add([u(me/next)],1)];@pemit %#=Message number [words([u(me/message_list)])] posted to [name(me)].},{@pemit %#=I'm sorry, but the bulletin board is full. Please contact [owner(me)] about cleaning it up.}
&NEXT Local Bulletin Board=1
&DO_BPOST_ANON Local Bulletin Board=$bpost/a *=*:@swi [gte([words([u(me/message_list)])],50)]=0,{&msg_[u(me/next)]_title me=[switch([gt([strlen(%0)],50)],1,{[mid(%0,0,50)]},%0)];&msg_[u(me/next)]_date me=RL: [time()] | IC: [vtime()];&msg_[u(me/next)]_author_name me=Anonymous;&msg_[u(me/next)]_author_db me=%#;&msg_[u(me/next)]_text me=%1;&message_list me=[setunion([u(me/message_list)],[u(me/next)])];&next me=[add([u(me/next)],1)];@pemit %#=Message number [words([u(me/message_list)])] posted to [name(me)] anonymously.},{@pemit %#=I'm sorry, but the bulletin board is full. Please contact [owner(me)] about cleaning it up.}
&DO_BREAD Local Bulletin Board=$bread *:@swi [setq(9,[index([u(me/message_list)], ,%0,1)])][setq(8,[hasattr(me,message_list)])][r(8)]=1,{@swi [member([lnum(1,[words([u(me/message_list)])])],%0)]=0,{@pemit %#=That message number is out of range. Enter a number from 1 to [words([u(me/message_list)])].},{@pemit %#=[repeat(=,78)]%rMessage: %0%rTitle: [u(me/msg_[r(9)]_title)]%rAuthor: [u(me/msg_[r(9)]_author_name)]%rDate: [u(me/msg_[r(9)]_date)]%r[repeat(-,78)]%r[u(me/msg_[r(9)]_text)]%r[repeat(=,78)]}},@pemit %#=There are no messages to read.
&DO_BREMOVE Local Bulletin Board=$bremove *:@swi [setq(9,[index([u(me/message_list)], ,%0,1)])][setq(8,[hasattr(me,message_list)])][r(8)]=1,{@swi [member([lnum(1,[words([u(me/message_list)])])],%0)]=0,@pemit %#=That message number is out of range.,{@swi [or([isstaff(%#)],[switch([u(me/msg_[r(9)]_author_db)],%#,1,0)],[switch([owner( me)],%#,1,0)])]=1,{@wipe me/*_[r(9)]_*;&message_list me=[setdiff([u(me/message_list)],[r(9)])];@pemit %#=Message %0 removed.},@pemit %#=You cannot remove a message that you do not own.}},@pemit %#=There are no messages to remove.
&DO_BLIST Local Bulletin Board=$blist:@pemit %#=[u(me/header)]%r%b[iter([u(me/message_list)],[member([u(me/message_list)],##)][space([sub(4,[strlen([member([u(me/message_list)],##)])])])][u(me/msg_##_title)][space([sub(50,[strlen([u(me/msg_##_title)])])])][mid([u(me/msg_##_date)],4,11)][mid([u(me/msg_##_date)],24,4)]%r)]%r[u(me/footer)]
&STATUS Local Bulletin Board=ON
&DO_BSET Local Bulletin Board=$bset *:@swi [owner(me)]=%#,{@swi [member(ON OFF,[ucstr(%0)])]=0,@pemit %#=Valid options are ON and OFF.,&status me=[ucstr(%0)];@pemit %#=Anonymous status set to [ucstr(%0)].},@pemit %#=You must be the owner to use that feature.
&MAX Local Bulletin Board=50
&DO_BHELP Local Bulletin Board=$bhelp:@pemit %#=[center( Help for Local Bulletin Board System ,78,=)]%r%r* blist - Lists all messages.%r* bpost <title>=<text> - Posts a message called <title> (up to 30 characters) with message <text>.%r* bmax # - Sets the max number of messages to #. Default is 50. (Owner only.)%r* bpost/a <title>=<text> - Anonymously posts a message called <title> (up to 30 characters) with message <text>.%r* bread # - Reads that message number.%r* bappend #=<text> - Appends text to that message number.%r* bremove # - Removes that message #. (Only works if you own the message, own the bulletin board, or are staff.)%r* bset <on/off> - Sets the anonymous feature on or off. (Owner only.)%r%rThe anonymous feature may be turned on or off by the owner of the bulletin board. The status of this board is [u(me/status)]. DB#'s of anonymous posters are captured, but not shown to the general public, in the event that someone wishes to trace an author.%r%r[u(me/footer)]
&DO_BAPPEND Local Bulletin Board=$bappend *=*:@swi [setq(9,[index([u(me/message_list)], ,%0,1)])][setq(8,[hasattr(me,message_list)])][r(8)]=1,{@swi [member([lnum(1,[words([u(me/message_list)])])],%0)]=0,{@pemit %#=That message number is out of range. Enter a number from 1 to [words([u(me/message_list)])].},{&msg_[r(9)]_text me=[v(msg_[r(9)]_text)]%r%rAdded by %N:%r%1;@wait 1=&msg_[r(9)]_date me=RL: [time()] | IC: [vtime()];@pemit %#=Text added.}},@pemit %#=Cannot find that message number.
@set Local Bulletin Board=INHERIT
@set Local Bulletin Board=STICKY
@set Local Bulletin Board=COMMANDS

think Edit vtime() with your IC time function, or remove it entirely from the code.