Myrddin's BBS extension: +bbnext

An extension to Myrddin's BBS system, the "+bbnext" command allows you to read the next unread message on the board. NOTE: Requires Myrddin's BBS v4.0.6.

Category: Bulletin Board
Commands: @dolist, @pemit, @switch.

Instructions

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

MUSHCode for Myrddin's BBS extension: +bbnext

@@ An extension to Myrddin's BBS system, the "+bbnext" command allows you to read the next
@@ unread message on the board. Requires Myrddin's BBS system v4.0.6.

@@ Instructions:
@@ Replace #1234 with the dbref of your "BBS - Myrddin's Global BBS v4.0.6" object.
@@ Replace #2641 with the dbref of your "bbpocket" object.

&CMD_BBNEXT #1234=$+bbnext:@switch [iter([setdiff([get(#2641/master_lst)],[get(%#/bb_read)])],##)]=,@pemit %#=No unread messages.,{@dolist [get(#2641/groups)]=@switch [hasattr(##,hdr_[first([setdiff([get(#2641/master_lst)],[get(%#/bb_read)])])])]=1,@pemit %#=[center(%B[name(##)]%b,80,=)]%R[ljust([extract([get(##/hdr_[first([setdiff([get(#2641/master_lst)],[get(%#/bb_read)])])])],1,1,|)],35)][ljust([extract([get(##/hdr_[first([setdiff([get(#2641/master_lst)],[get(%#/bb_read)])])])],2,1,|)],15)][ljust([extract([get(##/hdr_[first([setdiff([get(#2641/master_lst)],[get(%#/bb_read)])])])],3,1,|)],10)]%R[repeat(-,80)]%R[get(##/bdy_[first([setdiff([get(#2641/master_lst)],[get(%#/bb_read)])])])]%R[repeat(=,80)][set(%#,bb_read:[get(%#/bb_read)]%B[first([setdiff([get(#2641/master_lst)],[get(%#/bb_read)])])])]