Instructions

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

MUSHCode for Susan's Bulletin Board

@create Bulletin Board
@lock Bulletin Board==me
&BBPOST Bulletin Board=$.bbpost:@switch member(lattr(me),TEMP[%#])=0,@pemit %# = You aren't writing a post yet.,{&mess[get(me/counter)] me = [get(me/temp[%#])];&subject[get(me/counter)] me = [get(me/tempsub[%#])];&author[get(me/counter)] me = %N;&date[get(me/counter)] me = time();&list me = [get(me/list)] [get(me/counter)];&counter me = add(1,get(me/counter));&temp[%#] me;&tempsub[%#] me;@pemit %# = Your message has now been posted.}
&BBREAD Bulletin Board=$.bbread *:@switch or(gt(%0,words(get(me/list))),not(isnum(%0)))=1,@pemit %# = That's not a valid message.,{@pemit %# = %r[repeat(-,75)]%rMessage #[extract(get(me/list),%0,1)]: written by [get(me/author[extract(get(me/list),%0,1)])] on [get(me/date[extract(get(me/list),%0,1)])]%rSubject: [get(me/subject[extract(get(me/list),%0,1)])]%r[repeat(-,75)]%r[get_eval(me/mess[extract(get(me/list),%0,1)])]%r[repeat(-,75)]}
&BBLIST Bulletin Board=$.bblist:@pemit %# = [repeat(-,78)]%r[space(2)]#[repeat(%b,3)]Name[repeat(%b,12)]Subject%r[repeat(-,78)];@dolist get(me/list) = @pemit %# = [repeat(%b,sub(3,strlen(member(get(me/list),##))))][member(get(me/list),##)]%b%b[u(leftad,get(me/author##),15)]%b%b[u(leftad,get(me/subject##),35)]%b%b[extract(get(me/date##),1,4)][switch(eq(##,extract(get(me/list),words(get(me/list)),1)),1,%r[repeat(-,78)],)]
&BBADD Bulletin Board=$.bbadd *:@switch member(lattr(me/temp*),TEMP[%#])=0,{@pemit %# = You need to use .bbwrite to start a post before adding to it!},{&temp[%#] me=[get(me/temp[%#])] [trim(%0,b, )];@pemit %# = The text has been added to your post.}
&BBPROOF Bulletin Board=$.bbproof:@switch member(lattr(me),TEMP[%#])=0,@pemit %# = You aren't writing a post yet.,{@pemit %# = You are entering a post as follows:%rSubject: [get(me/tempsub[%#])]%rText:%r[get(me/temp[%#])]}
&BBEDIT Bulletin Board=$.bbedit *=*:@switch member(lattr(me/temp*),TEMP%#)=0,{@pemit %# = You aren't writing a note to edit.},{&temp%# me = [edit(get(me/temp%#),trim(%0,b, ),trim(%1,b, ))];@pemit %# = The text of your note how reads:%r[repeat(-,75)]%r[get(me/temp%#)]%r[repeat(-,75)]}
&BBTOSS Bulletin Board=$.bbtoss:@switch member(lattr(me/temp*),TEMP[%#])=0,{@pemit %# = You aren't writing a note anyway.},{&temp[%#] me;&tempsub[%#] me;@pemit %# = Your note has been discarded.}
&COUNTER Bulletin Board=0
@Desc Bulletin Board=A bulletin board.
&LEFTAD Bulletin Board=[mid(%0,0,%1)][space(sub(%1,strlen(mid(%0,0,%1))))]
&BBDELETE Bulletin Board=$.bbdelete *:@switch [or(hasflag(%#,WIZARD),strmatch(owner(me),*%#*))]=1,{@switch gt(%0,words(get(me/list)))=1,@pemit %# = That's not a valid message.,{&mess[extract(get(me/list),%0,1)] me;&author[extract(get(me/list),%0,1)] me;&subject[extract(get(me/list),%0,1)] me;&date[extract(get(me/list),%0,1)] me;&list me=[remove(get(me/list),extract(get(me/list),%0,1))];@pemit %# = Message #[%0] has been deleted.}},@pemit %# = Huh?%b%b(Type "help" for help.)
&CREDITS Bulletin Board=This bulletin board was graciously given to us by Susan@DarkMetal(MUSH) ....many thanks Susan!
&TOPIC Bulletin Board=Board Name Here
@Adesc Bulletin Board=@pemit %#=[repeat(*,78)]%r%r[center([u(topic)] Bulletin Board Commands,78)]%r%r[space(27)].bbwrite <subject>=<message>%r[space(27)].bbadd <text>%r[space(27)].bbedit <old text>=<new text>%r[space(27)].bbproof%r[space(27)].bblist%r[space(27)].bbtoss%r[space(27)].bbpost%r[space(27)].bbread <message #>%r[space(27)].bbdelete <message #>%r%r[repeat(*,78)][switch(hasflag(%#,wizard),1,{%rWiz only:[space(18)]topic <topic>%r[space(27)](replaces the "[u(topic)]" in this menu.)%r[repeat(*,78)]},0,@@)]
&TOPICSET Bulletin Board=$topic *:&topic me=%0;@pemit %#=Topic now set it "%0".
@Fail Bulletin Board=You cannot pick this up....sorry.
@Ofail Bulletin Board=tries foolishly to pick up the [name(me)].
&BBWRITE Bulletin Board=$.bbwrite *=*:&temp[%#] me=[trim(%1,b, )];&tempsub[%#] me = [trim(%0,b, )];@pemit %# = You begin to write a bulletin board post.
@set Bulletin Board=INHERIT
@set Bulletin Board=COMMANDS
@set Bulletin Board=!NO_COMMAND