Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| @@ DEPENDENCIES: Core | |
| @@ RECOMMENDED: Lock Management System - Without it, +bblock and +bbunlock will have only basic functionality. | |
| @@ RECOMMENDED: Group Management System - Installing both together provides Groups with separate boards. | |
| @@ RECOMMENDED: Account Management System - Characters bound to accounts share the same read/unread data. | |
| th u(NEWCOBJ,Volund's Board System <BBS>,bbs,,,,WIZARD SAFE !NO_COMMAND,INHERIT SIDEFX SAFE) | |
| &SYSTEM`NAME [u(cobj,bbs)]=u(strfirstof`%va,%q<sysname>,BBS) | |
| &CMD`BB`PENNMUSH [u(cobj,bbs)]=$^(?s)\+(bb|gb)(\S+)(?\: +(.+?))?(?\:/(.+?)?)?(?\:=(.*))?$:@attach %!/CMD`BB`MAIN | |
| @set [u(cobj,bbs)]/CMD`BB`PENNMUSH=regexp | |
| &CMD`BB`RHOSTMUSH [u(cobj,bbs)]=$^(?s)\+(bb|gb)(\\S+)(?\: +(.+?))?(?\:/(.+?)?)?(?\:=(.*))?$:@attach %!/CMD`BB`MAIN | |
| @set [u(cobj,bbs)]/CMD`BB`RHOSTMUSH=regexp | |
| &CMD`BB`MAIN [u(cobj,bbs)]=@attach %!/INC`INIT`%1;@attach %!/INC`PARTIAL=%2,setunion(setunion(v(COMMANDS`PLAYER),if(u(setr`%va,isadmin,switch(%1,bb,u(isadmin`%va,%#),gb,u(u(cobj,gms)/FUN`GRPPERM,%:,%q<gid1>,GBADMIN))),v(COMMANDS`ADMIN)),|,|),if(u(iswizard`%va,%#),v(COMMANDS`WIZARD)),|,|),|,command,command;@attach %!/INC`[u(strfirstof`%va,%q<command>,WRITE)]=ucstr(%1),%3,%4,%5 | |
| @set [u(cobj,bbs)]/CMD`BB`[switch(%va,PennMUSH,RHOSTMUSH,RhostMUSH,PENNMUSH)]=no_command | |
| &CMD`BBWRITE [u(cobj,bbs)]=$^(?s)\+(bb|gb)(?\: +(.*))?$:th u(setq`%va,sysname,ucstr(%1S));@attach %!/INC`INIT`%1;@attach %!/INC`WRITE=ucstr(%1),%2 | |
| @set [u(cobj,bbs)]/CMD`BBWRITE=regexp | |
| &COMMANDS`PLAYER [u(cobj,bbs)]=READ|POST|REMOVE|MOVE|SCAN|NEXT|EDIT|WRITE|JOIN|LEAVE|LIST|PROOF|TOSS|CATCHUP|SEARCH|NEW|TIMEOUT|ALL|COMMENT|BRIEF|ORDER|REPLACE | |
| &COMMANDS`ADMIN [u(cobj,bbs)]=NEWGROUP|CLEARGROUP|CONFIG|TIMEOUT|LOCK|UNLOCK|RENAME | |
| &COMMANDS`WIZARD [u(cobj,bbs)]=IMPORT|CONVERT|TRANSFER | |
| &INC`INIT`GB [u(cobj,bbs)]=@check isdbref(u(cobj,gms))=@attach %!/INC`MSG=ERROR: The Group System is not installed!;@check u(game_config,bbs,gbs)=@attach %!/INC`MSG=ERROR: Group Boards are disabled.;@attach u(cobj,gms)/INC`CODE`VALGROUP=switch(%2,rea*,u(strfirstof`%va,%5,u(getstat,%#,D`GROUP,Group),0),sca*,u(strfirstof`%va,%3,u(getstat,%#,D`GROUP,Group),0),u(strfirstof`%va,u(getstat,%#,D`GROUP,Group),0)),1;@assert elock(%q<gid1>,%#)=@attach %!/INC`MSG=ERROR: You are not a member of that group.;th u(setstat,%#,D`GROUP,Group,%q<gid1>);th u(setq`%va,allboards,u(FUN`LISTGROUPS`GB,%q<gid1>));th u(setq`%va,visigroups,u(filter,CANREAD`GB,%q<allboards>,%b,%b,%#,%q<gid1>));th u(setq`%va,readgroups,u(filter,NOTOMIT,%q<visigroups>,%b,%b,%#));th u(setq`%va,sysname,GBS) | |
| &INC`INIT`BB [u(cobj,bbs)]=th u(setq`%va,allboards,u(FUN`LISTGROUPS`BB));th u(setq`%va,visigroups,u(filter,CANREAD`BB,%q<allboards>,%b,%b,%#));th u(setq`%va,readgroups,u(filter,NOTOMIT,%q<visigroups>,%b,%b,%#));th u(setq`%va,sysname,BBS) | |
| &INC`INIT`BBOTHER [u(cobj,bbs)]=th u(setq`%va,allboards,u(u(cobj,bbs)/FUN`LISTGROUPS`BB));th u(setq`%va,visigroups,u(u(cobj,bbs)/FUN`VALIDGROUPS,BB,READ,%#,%q<allboards>,,1));th u(setq`%va,readgroups,u(u(cobj,bbs)/FUN`VALIDGROUPS,BB,READ,%#,%q<allboards>)) | |
| &FUN`VALIDGROUPS [u(cobj,bbs)]=localize(if(words(u(setr`%va,valgroups,u(filter,CAN%1`%0,%3,%b,%b,%2,u(strfirstof`%va,%4,%q<gid1>)))),if(%5,%q<visigroups>,u(FILTER,NOTOMIT,%q<visigroups>,%b,%b,%2)))) | |
| @@ %0 - Mode. (GB|BB) %1 - Check type. (READ|WRITE|ADMIN). %2 - Viewer. %3 - Boards. %4 - Group override. %5 - Omit override. | |
| &FIL`CANREAD`BB [u(cobj,bbs)]=cor(not(u(FUN`READLOCK`BB,%0,%1)),elock(%0,%1),u(isadmin`%va,%1)) | |
| &FIL`CANWRITE`BB [u(cobj,bbs)]=cor(not(u(FUN`WRITELOCK`BB,%0,%1)),elock(%0/enter,%1),u(isadmin`%va,%1)) | |
| &FIL`CANADMIN`BB [u(Cobj,bbs)]=cor(u(isadmin`%va,%1),switch(%va,PennMUSH,if(not(strmatch(lock(%0/Admin),*UNLOCKED*)),elock(%0/admin,%1),0))) | |
| &FUN`READLOCK`BB [u(cobj,bbs)]=switch(%va,PennMUSH,not(strmatch(lock(%0),*UNLOCKED*)),RhostMUSH,t(strlen(lock(%0)))) | |
| &FUN`WRITELOCK`BB [u(cobj,bbs)]=switch(%va,PennMUSH,not(strmatch(lock(%0/enter),*UNLOCKED*)),RhostMUSH,t(strlen(lock(%0/enter)))) | |
| &FIL`NOTOMIT [u(cobj,bbs)]=eq(default(%1/D`BB`%0`OMIT,0),0) | |
| &FIL`CANREAD`GB [u(cobj,bbs)]=cor(not(u(FUN`READLOCK`GB,%0)),lte(u(u(cobj,gms)/FUN`GETRANK,%2,objid(%0)),default(%0/CANREAD,100000)),u(FIL`CANADMIN`GB,%0,%1,%2)) | |
| &FIL`CANWRITE`GB [u(cobj,bbs)]=cor(lte(u(u(cobj,gms)/FUN`GETRANK,%2,objid(%1)),default(%0/CANWRITE,100000)),u(FIL`CANADMIN`GB,%0,%1,%2)) | |
| &FIL`CANADMIN`GB [u(cobj,bbs)]=u(u(cobj,gms)/FUN`GRPPERM,objid(%1),%2,MODERATE,GROUP) | |
| &FUN`READLOCK`GB [u(cobj,bbs)]=t(get(%0/CANREAD)) | |
| &FUN`WRITELOCK`GB [u(cobj,bbs)]=t(get(%0/CANWRITE)) | |
| &FUN`BBSPRIORITY [u(cobj,bbs)]=[u(setq`%va,max,lmath(max,iter(u(setr`%va,passed,iter(filterbool(#lambda/u(FUN`CANREAD`BB,\%0,%2,,),filterbool(#lambda/hasflag(\%0,CONNECTED),alts(if(isadmin(%#),%0,%#)))),%i0~[default(%i0/D`ALTS`PRIORITY,0)],%b,|)),after(%i0,~),|,%b)))][iter(filterbool(#lambda/eq(after(\%0,~),%q<max>),%q<passed>,|,|),before(%i0,~),|,%b)] | |
| &PLAYER`CONNECT [u(cobj,bbs)]=@dolist/inline u(lattr`%va,%!/PLAYER`CONNECT`*)={@trigger %!/##=%0,%1,%2,%3,%4,%5,%6,%7,%8,%9} | |
| &PLAYER`CONNECT`CHECK [u(cobj,bbs)]=@check u(player_config`%va,%0,ALERTS,BBS);@select/inline u(player_config`%va,%0,ALERTS,BBS_BRIEF)=1,{@force %0=+bbbrief},0,{@force %0=+bbscan} | |
| th u(NEWCONF,pconf,ALERTS,BBS,1,Show +bbscan at logon?,BOOL) | |
| th u(NEWCONF,pconf,ALERTS,BBS_BRIEF,0,Show +bbbrief instead of +bscan?,BOOL) | |
| &FUN`LISTGROUPS`BB [u(cobj,bbs)]=u(sortboards,u(filter,ISBOARD,u(lthings`%va,%!))) | |
| &FUN`LISTGROUPS`GB [u(cobj,bbs)]=u(sortboards,u(filter,ISBOARD,u(lthings`%va,u(strfirstof`%va,%0,%q<gid1>)))) | |
| &FIL`ISBOARD [u(cobj,bbs)]=cand(isdbref(%0),hasattr(%0/ORDER)) | |
| &SORTBOARDS [u(cobj,bbs)]=u(SORTBOARDS`%va,%0,if(strlen(%1),%1,%B),if(strlen(%2),%2,%B)) | |
| &SORTBOARDS`PENNMUSH [u(cobj,bbs)]=sortkey(#lambda/get(\%0/ORDER),%0,n,%1,%2) | |
| &SORTBOARDS`RHOSTMUSH [u(cobj,bbs)]=sortby(#lambda/[lit([ncomp(default(%0/ORDER,99),default(%1/ORDER,99))])],%0,%1,%2) | |
| &INC`CHECK`FINDBB [u(cobj,bbs)]=@check strlen(%1)=@attach %!/INC`MSG=ERROR: You must enter a board to use!;@select/inline isdbref(%8)=1,{@attach %!/INC`INIT`BB;th u(setq`%va,bbnum,get(u(setr`%va,bb,u(namegrab`%va,%q<allboards>,%1))/ORDER))},{@select/inline u(valnum,%1)=1,{th u(setq`%va,bbnum,get(u(setr`%va,bb,u(filter,BBNUM,if(%3,%q<visigroups>,%q<readgroups>),%b,%b,%1))/ORDER))},0,{th u(setq`%va,bbnum,get(u(setr`%va,bb,u(namegrab`%va,if(%3,%q<visigroups>,%q<readgroups>),%1))/ORDER))}};@check isdbref(%q<bb>)=@attach %!/INC`MSG=ERROR: You are not a [ucstr(%2)] member of that board.,u(strfirstof`%va,%8,%#);@select/inline match(WRITE|ADMIN,%2,|)=>0,{@check u(FIL`CAN%2`%0,%q<bb>,u(strfirstof`%va,%8,%#),%q<gid1>)}=@attach %!/INC`MSG=ERROR: You are not a [ucstr(%2)] member of that board.;th u(setq`%va,listposts,u(FUN`LISTPOSTS,%q<bb>));th u(setq`%va,readposts,u(FUN`GETREAD,u(strfirstof`%va,%8,%#),%q<bb>)) | |
| @@ %0 - Style, %1 - Board Name/Num. %2 - Type (READ|WRITE|ADMIN). %3 - Omit Override, %4 - Group DBREF?, %8 - SceneSys mode. Alternate enactor dbref! | |
| &FIL`BBNUM [u(cobj,bbs)]=eq(get(%0/ORDER),%1) | |
| &INC`CHECK`FINDPOST [u(cobj,bbs)]=@check strlen(%1)=@attach %!/INC`MSG=ERROR: No post entered!;@check u(valnum,%1)=@attach %!/INC`MSG=ERROR: Posts must be addressed by their post #s!;@check strlen(u(setr`%va,post,elements(%q<listposts>,u(setr`%va,postnum,%1))))=@attach %!/INC`MSG=ERROR: Post not found. | |
| &FUN`LISTPOSTS [u(cobj,bbs)]=u(sortposts,edit(u(lattr`%va,%0/~`*),~`,)) | |
| &SORTPOSTS [u(cobj,bbs)]=u(SORTPOSTS`%va,%0,if(strlen(%1),%1,%B),if(strlen(%2),%2,%B)) | |
| &SORTPOSTS`PENNMUSH [u(cobj,bbs)]=sortkey(#lambda/baseconv(\%0,36,10),%0,n,%1,%2) | |
| &SORTPOSTS`RHOSTMUSH [u(cobj,bbs)]=sortby(#lambda/[lit([ncomp(u(baseconv`%va,%0,36,10),u(baseconv`%va,%1,36,10))])],%0,%1,%2) | |
| &FUN`MESSLIST [u(cobj,bbs)]=sort(setunion(iter(%2,switch(1,u(valnum,%i0),%i0,regmatchi(%i0,v(REG`NUMRANGE)),u(setq`%va,num1,abs(before(%i0,-)))[u(setq`%va,num2,abs(after(%i0,-)))][u(setq`%va,ord,sort(%q<num1> %q<num2>))][lnum(first(%q<ord>),last(%q<ord>))],strmatch(%i0,u),iter(setdiff(%3,u(FUN`GETREAD,%0,%1)),match(%3,%i0)),strmatch(%i0,all),lnum(1,words(%3)),0),\,,%B),)) | |
| @@ %0 - Viewer. %1 - Board DBREF. %2 - Entry. %3 - post list. | |
| ®`NUMRANGE [u(cobj,bbs)]=^\d+-\d+$ | |
| &FUN`CONFIG [u(cobj,bbs)]=if(cand(strlen(%0),isdbref(%0)),u(FUN`CONFIG`BB`%1,%0),if(strlen(%0),u(FUN`CONFIG`GLOBAL`%0))) | |
| th u(NEWCONF,config,BBS,AUTO_TIMEOUT,1,Enable BBS timeout check?,BOOL) | |
| th u(NEWCONF,config,BBS,TIMEOUT,2592000,Default timeout?,DURATION) | |
| th u(NEWCONF,config,BBS,INTERVAL,86400,Interval between timeout checks?,DURATION) | |
| th u(NEWCONF,config,BBS,MANDATORY,3600,Interval between mandatory checks?,DURATION) | |
| th u(NEWCONF,config,BBS,GUEST_POST,1,Guests can post?,BOOL) | |
| th u(NEWCONF,config,BBS,GBS,1,Enable group boards?,BOOL) | |
| &FUN`CONFIG`BB`TIMEOUT [u(cobj,bbs)]=udefault(%0/TIMEOUT,u(game_config,bbs,timeout)) | |
| &INC`POST [u(cobj,bbs)]=@attach %!/INC`JAILCHECK;@attach %!/INC`GUESTCHECK;@select/inline strlen(%1)=0,{@check hasattr(%#/D`%0`NEW`BB)=@attach %!/INC`MSG=ERROR: You don't have a post in progress.;th u(setq`%va,gid1,get(%#/D`%0`NEW`GID));@attach %!/INC`POST`MAKEMESS=%#,get(%#/D`%0`NEW`BBNUM),get(%#/D`%0`NEW`BB),left(get(%#/D`%0`NEW`TITLE),34),get(%#/D`%0`NEW`TEXT),get(%#/D`%0`NEW`TYPE);@wipe %#/D`%0`NEW},{@attach u(cobj,bbs)/INC`CHECK`FINDBB=%0,%1,WRITE,,,,,,%4;@check strlen(%2)=@attach %!/INC`MSG=ERROR: Title field empty!;@stop cor(strmatch(%2,*%r*),strmatch(%2,*%t*))=@attach %!/INC`MSG=ERROR: Titles may not contain linebreaks or indents.;@select/inline strlen(%3)=0,{@attach %!/INC`POST`BEGIN},{@attach u(cobj,bbs)/INC`POST`MAKEMESS=u(strfirstof`%va,%4,%#),%q<bbnum>,%q<bb>,left(%2,34),%3,%0}} | |
| @@ %0 - mode. %1 - Board DBREF. %2 - Subject. %3 - text. %4 - SceneSys mode enactor dbref? | |
| &INC`GUESTCHECK [u(cobj,bbs)]=@select/inline u(game_config,BBS,GUEST_POST)=0,{@stop u(isguest,%#)=@attach %!/INC`MSG=ERROR: Permission denied. Guests may not make posts.} | |
| &INC`POST`BEGIN [u(cobj,bbs)]=@stop hasattr(%#/D`%0`NEW)=@attach %!/INC`MSG=ERROR: You already have a post in progress. use +[lcstr(%0)] <text> to add to it\, +[lcstr(%0)]proof to view it\, or +[lcstr(%0)]post to post it. Alternatively\, +[lcstr(%0)]toss to trash it.;&D`%0`NEW`BBNUM %#=%q<bbnum>;&D`%0`NEW`BB %#=%q<bb>;&D`%0`NEW`TITLE %#=%2;&D`%0`NEW`TYPE %#=%0;&D`%0`NEW`GID %#=%q<gid1>;@pemit %#=You start your posting to Board #%q<bbnum> ([name(%q<bb>)])%RYou can now compose the body of the post by using '+[lcstr(%0)]write <text>'%Ror '+[lcstr(%0)] <text>'. When you are finished, type '+[lcstr(%0)]post' to send it. See '+help bbs' for help! | |
| &INC`ALTWRITE [u(cobj,bbs)]=@attach %!/INC`WRITE=%0,%1 | |
| &INC`WRITE [u(cobj,bbs)]=@check hasattr(%#/D`%0`NEW`BB)=@attach %!/INC`MSG=ERROR: You don't have a post in progress.;@stop eq(strlen(get(%#/D`%0`NEW`TEXT)),u(setr`%va,max,strlen(lnum(1,9999))))=@attach %!/INC`MSG=ERROR: Your post has already reached %q<max> characters - all that will fit. You may not add more text.;@check strlen(u(setr`%va,entry,%1[if(strlen(%2),/%2)][if(strlen(%3),=%3)]))=@attach %!/INC`MSG=ERROR: Nothing entered to write. Use +[lcstr(%0)]proof to see what you've written!;&D`%0`NEW`TEXT %#=trim(cat(trim(get(%#/D`%0`NEW`TEXT)),trim(%q<entry>)));@attach %!/INC`MSG=Text added to bbpost. Your post has reached [strlen(get(%#/D`%0`NEW`TEXT))] of [strlen(lnum(1,9999))] max characters! | |
| &INC`TOSS [u(cobj,bbs)]=@check hasattr(%#/D`%0`NEW`BB)=@attach %!/INC`MSG=ERROR: You don't have a post in progress.;@attach %!/WIPE=%#,D`%0`NEW;@attach %!/INC`MSG=Post discarded. | |
| &INC`PROOF [u(cobj,bbs)]=@check hasattr(%#/D`%0`NEW`BB)=@attach %!/INC`MSG=ERROR: You don't have a post in progress.;@pemit %#=u(HEADER,name(get(%#/D`%0`NEW`BB)) - [get(%#/D`%0`NEW`TITLE)]);@pemit %#=get(%#/D`%0`NEW`TEXT);@pemit %#=u(HEADER,Length: [strlen(get(%#/D`%0`NEW`TEXT))] Characters) | |
| &INC`POST`MAKEMESS [u(cobj,bbs)]=th u(setq`%va,next,u(baseconv`%va,default(%2/NEXT,1),10,36));&NEXT %2=add(default(%2/NEXT,1),1);th u(attrib_set`%va,%2,~`%q<next>,%4);&~`%q<next> %2=%4;&~`%q<next>`DETAILS %2=[name(%0)]|[objid(%0)]|[secs()];&~`%q<next>`HDR %2=%3;@select/inline u(u(cobj,bbs)/FUN`CONFIG,%2,TIMEOUT)=0,{&~`%q<next>`TIMEOUT %2=mul(60,60,24,30);&~`%q<next>`NOTIMEOUT %2=1},{&~`%q<next>`TIMEOUT %2=u(firstof`%va,u(u(cobj,bbs)/FUN`CONFIG,%2,TIMEOUT),0)};@select/inline %5=BB,{@attach u(cobj,bbs)/INC`ALERT=%5,%1,%2,{(New [ucstr(%5)] Message ([u(pueblize,u(setr`%va,messnum,%1/[u(nattr`%va,%2/~`*)]),+[lcstr(%5)]read %q<messnum>)]) posted to '[u(moniker`%va,%2)]' by [default(%2/ANONYMOUS,u(moniker`%va,%0))]: %3)}},GB,{@attach u(cobj,bbs)/INC`ALERT=%5,%1,%2,{[ansi(hc,<GROUP BB>)] New message posted on '[u(pueblize,%q<gname1>,+group %q<gname1>)]' '[u(moniker`%va,%2)]' Board ([u(pueblize,u(setr`%va,messnum,%1/[u(nattr`%va,%2/~`*)]),+[lcstr(%5)]read %q<messnum>=%q<gid1>)]) by [default(%2/ANONYMOUS,u(moniker`%va,%0))]: %3}};th u(FUN`SETREAD,%0,%q<bb>,%q<next>);&D`BB`LASTPOST %0=%q<bb> %q<next> | |
| @@ DETAILS - Name, DBREF, timestamp, edited, old timestamp | |
| &FUN`GETREAD [u(cobj,bbs)]=localize(switch(cand(isdbref(u(setr`%va,accid,u(accid,%0))),not(u(isguest,%0))),>0,get(%q<accid>/D`BB`%1`READ),get(%0/D`BB`%1`READ))) | |
| &FUN`SETREAD [u(cobj,bbs)]=localize(switch(cand(isdbref(u(setr`%va,accid,u(accid,%0))),not(u(isguest,%0))),>0,u(attrib_set`%va,%q<accid>,D`BB`%1`READ,setunion(setinter(u(FUN`GETREAD,%0,%1),u(FUN`LISTPOSTS,%1)),%2)),u(attrib_set`%va,%0,D`BB`%1`READ,setunion(setinter(u(FUN`GETREAD,%0,%1),u(FUN`LISTPOSTS,%1)),%2)))) | |
| &INC`ALERT [u(cobj,bbs)]=@select/inline %0=BB,{th u(setq`%va,members,u(filter,NOTOMIT2,u(filter,CANREAD2`BB,setunion(lwho(),),%B,%B,%2),%b,%b,%2))},GB,{th u(setq`%va,members,u(filter,NOTOMIT2,u(filter,CANREAD2`GB,setunion(lwho(),),%B,%B,%2,%q<gid1>),%b,%b,%2))};@pemit/list %q<members>=%3 | |
| @@ %0 - Mode, GB or BB. %1 - Board number. %2 - Board DBREF. %3 - Message. | |
| &FIL`CANREAD2`BB [u(cobj,bbs)]=cor(not(u(FUN`READLOCK`BB,%1,%0)),elock(%1,%0),u(isadmin`%va,%0)) | |
| &FIL`CANREAD2`GB [u(cobj,bbs)]=cand(elock(%2,%0),cor(not(u(FUN`READLOCK`GB,%1)),lte(u(u(cobj,gms)/FUN`GETRANK,%2,objid(%1)),default(%1/CANREAD,100000)),u(FIL`CANADMIN`GB,%1,%0,%2))) | |
| &FIL`NOTOMIT2 [u(cobj,bbs)]=not(default(%0/D`BB`%1`OMIT,0)) | |
| &INC`NEWGROUP [u(cobj,bbs)]=@check strlen(%1%2)=@attach %!/INC`MSG=ERROR: No name entered for the new board!;@check valid(name,%1%2)=@attach %!/INC`MSG=ERROR: That is not a suitable name for a board.;@stop gte(strlen(%1%2),29)=@attach %!/INC`MSG=ERROR: Board names must be 29 characters long or less.;@stop isdbref(u(find_in`%va,switch(%0,BB,u(cobj,bbs),GB,%q<gid1>),trim(%1%2)))=@attach %!/INC`MSG=ERROR: A board already has that name.;@tel [u(setr`%va,bb,create(trim(%1%2)))]=[switch(%0,BB,u(cobj,bbs),GB,%q<gid1>)];@power %q<bb>=many_attribs;th u(setq`%va,ordermax,u(lmax`%va,iter(u(u(cobj,bbs)/FUN`LISTGROUPS`%0,%q<gid1>),get(%i0/ORDER))));th u(attrib_set`%va,%q<bb>,ORDER,add(1,%q<ordermax>));@set %q<bb>=SAFE;@attach %!/INC`MSG=Board '[trim(%1%2)]' created!;th u(setq`%va,bbnum,match(u(u(cobj,bbs)/FUN`LISTGROUPS`%0),%q<bb>)) | |
| &INC`CLEARGROUP [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,ADMIN;@attach %!/INC`VERIFY={[ansi(hr,WARNING:)] Deleting %q<sysname> Board %q<bbnum> will also delete all messages. This cannot be undone! Please enter the same command again within 10 seconds to verify.},CLEARGROUP %0 %1;@attach %!/DELETE=%q<bb>;@attach %!/INC`MSG=Board Deleted. | |
| &INC`REMOVE [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@check strlen(%2)=@attach %!/INC`MSG=ERROR: No posts entered to remove.;th u(setq`%va,listposts,u(FUN`LISTPOSTS,%q<bb>));th u(setq`%va,canadmin,u(FIL`CANADMIN`%0,%q<bb>,%#,%q<gid1>));@check words(u(setr`%va,processed,u(filter,CANMODIFY,u(setr`%va,orig,u(FUN`MESSLIST,%#,%q<bb>,before(%2,/),%q<listposts>)),%b,%b,%q<bb>,%:,%q<isadmin>,%q<listposts>)))=@attach %!/INC`MSG=ERROR: No posts to remove.;@select/inline gt(words(u(setr`%va,cannot,sort(setdiff(%q<processed>,%q<orig>)))),0)=1,{@attach %!/INC`MSG=Could not remove posts: [u(itemize`%va,%q<cannot>,%b,and,\,)]};@stop cand(gt(words(%q<processed>),1),strlen(after(%2,/)))=@attach %!/INC`MSG=Cannot remove comments from more than one post!;@select/inline t(strlen(after(%2,/)))=1,{@attach %!/INC`REMOVE`COMMENT},{@dolist %q<processed>={@attach %!/WIPE=%q<bb>,~`[elements(%q<listposts>,##)];@pemit %#=Message ## removed from group #%q<bbnum> ([u(moniker`%va,%q<bb>)]).}} | |
| &FIL`CANMODIFY [u(cobj,bbs)]=localize(if(strlen(u(setr`%va,postid,elements(%4,%0))),if(%3,1,strmatch(elements(get(%1/~`%q<postid>`DETAILS),2,|),%2)),0)) | |
| &INC`REMOVE`COMMENT [u(cobj,bbs)]=@check u(valnum,after(%2,/))=@attach %!/INC`MSG=ERROR: Comments must be addressed by their comment number!;@check strlen(u(setr`%va,comm,elements(u(sortattr`%va,u(lattr`%va,%q<bb>/~`[elements(%q<listposts>,%q<processed>)]`COMM`*)),after(%2,/))))=@attach %!/INC`MSG=ERROR: Comment not found.;@check cor(%q<isadmin>,strmatch(elements(get(%q<bb>/~`%q<comm>`DETAILS),2,|),%:))=@attach %!/INC`MSG=ERROR: You don't have permission to remove that comment.;@attach %!/WIPE=%q<bb>,~`%q<comm>;@attach %!/INC`MSG=Comment removed! | |
| &INC`READ [u(cobj,bbs)]=@select/inline strlen(%1%2)=0,{@attach %!/INC`READ`LISTGROUPS},{@select/inline cand(strlen(%1),strlen(%2))=1,{@attach %!/INC`READ`CHECKPOST},{@select/inline gt(strlen(%1),0)=1,{@attach %!/INC`READ`LISTMESS},{@attach %!/INC`MSG=ERROR: How the hell did we get here?}}} | |
| &FUN`NAME [u(cobj,bbs)]=switch(%0,BB,mudname() BBS%B[if(isdbref(%1),-%b[u(moniker`%va,%1)],Boards)],GB,u(moniker`%va,%2) GBS%B[if(isdbref(%1),-%b[u(moniker`%va,%1)],Boards)]) | |
| &INC`ALL [u(cobj,bbs)]=@check words(u(setr`%va,allunread,u(filter,UNREADBB,u(FUN`VALIDGROUPS`%0,%#,READ),%b,%b,%#)))=@attach %!/INC`MSG=There are no Unread messages on the %q<sysname>!;@dolist %q<allunread>={@select/inline %0=BB,{@force %#=+bbread ##/u},GB,{@force %#=+gbread ##/u}} | |
| &FIL`UNREADBB [u(cobj,bbs)]=t(words(setdiff(edit(u(lattr`%va,%0/~`*),~`,),u(FUN`GETREAD,%1,%0)))) | |
| &INC`READ`LISTGROUPS [u(cobj,bbs)]=@pemit %#=u(HEADER,u(fun`name,%0,%q<bb>,%q<gid1>));@pemit %#=ansi(u(color`%va,%#,COLOR,COLUMN_NAMES),[space(7)]Board Name[space(20)]Last Post[space(6)]# of messages);@pemit %#=u(SEPARATOR);@dolist %q<readgroups>={th u(setq`%va,listposts,u(FUN`LISTPOSTS,##));@pemit %#=rjust(u(pueblize,u(setr`%va,bbnum,get(##/ORDER)),+[lcstr(%0)]read [match(%q<allboards>,##)]),2)[center(u(FUN`SHOWLOCK,##,%#,%q<gid1>,%0),5)][ljust(u(pueblize,u(moniker`%va,##),+[lcstr(%0)]read %q<bbnum>),30)][ljust(if(u(setr`%va,time,first(elements(u(setr`%va,details,get(##/~`[u(setr`%va,last,last(%q<listposts>))]`DETAILS)),4 3,|,%B))),if(%q<time>,u(fancyday`%va,%q<time>,%#),elements(%q<details>,5,|)),None),20)][rjust(words(%q<listposts>),3)]%b[ljust(if(words(setdiff(%q<listposts>,u(FUN`GETREAD,%#,##))),U),2)];@select/inline #@=words(%q<readgroups>),{@pemit %#=u(SEPARATOR)%r'*' = restricted[space(5)]'-' = read only[space(5)]'%(-%)' = read only\, but you can write%r[u(FOOTER)]}} | |
| &FUN`SHOWLOCK [u(cobj,bbs)]=switch(u(FUN`READLOCK`%3,%0):[u(FUN`WRITELOCK`%3,%0)]:[u(FIL`CANWRITE`%3,%0,%1,%2)],1:*,*,0:1:0,-,0:1:1,lit((-)),0:0:1,) | |
| &INC`READ`LISTMESS [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,READ;@pemit %#=u(HEADER,u(fun`name,%0,%q<bb>,%q<gid1>));@pemit %#=space(8)Message[space(28)]Posted[space(8)]By;th u(setq`%va,anon,get(%q<bb>/ANONYMOUS));@pemit %#=u(SEPARATOR);@dolist %q<listposts>={@pemit %#=ljust(u(pueblize,u(setr`%va,command,%q<bbnum>/[match(%q<listposts>,##)]),+[lcstr(%0)]read %q<command>),6)[ljust(if(match(%q<readposts>,##),,U),2)][ljust(get(%q<bb>/~`##`HDR),35)][ljust(if(u(setr`%va,secs,first(elements(u(setr`%va,details,get(%q<bb>/~`##`DETAILS)),4 3,|,%B))),u(fancyday`%va,%q<secs>,%#),elements(%q<details>,5,|)),14)][u(setq,namedisp,if(t(strlen(%q<anon>)),%q<anon>[if(%q<isadmin>,%B%([if(isobjid(u(setr`%va,poster,elements(%q<details>,2,|))),u(moniker`%va,%q<poster>),elements(%q<details>,1,|) \(Deleted\))]%))],if(isobjid(u(setr`%va,poster,elements(%q<details>,2,|))),u(moniker`%va,%q<poster>),elements(%q<details>,1,|) \(Deleted\))))][switch(%va,PennMUSH,left(%q<namedisp>,21),RhostMUSH,ljc(%q<namedisp>,21))];@select/inline #@=words(%q<listposts>),{@pemit %#=u(FOOTER)}} | |
| &INC`READ`CHECKPOST [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,READ;th u(setq`%va,anon,get(%q<bb>/ANONYMOUS));@check strlen(%2)=@attach %!/INC`MSG=ERROR: No posts entered to check.;@check words(u(setr`%va,processed,u(filter,ISAPOST,u(FUN`MESSLIST,%#,%q<bb>,%2,%q<listposts>),%b,%b,%q<listposts>)))=@attach %!/INC`MSG=ERROR: Posts not found.;@dolist/inline %q<processed>=@attach %!/INC`READ`SHOWPOST=%0,##,%q<bb> | |
| &FIL`ISAPOST [u(cobj,bbs)]=t(strlen(elements(%1,%0))) | |
| &FUN`GETTIMEOUT [u(cobj,bbs)]=if(default(%0/~`%1`NOTIMEOUT,0),X,get(%0/~`%1`TIMEOUT)) | |
| @@ %0 - bbs, %1 - post | |
| &INC`READ`SHOWPOST [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDPOST=%0,%1,%2;th u(setq`%va,anon,get(%q<bb>/ANONYMOUS));@pemit %#=u(HEADER,u(fun`name,%0,%2,%q<gid1>));@pemit %#=ljust(Message: %q<bbnum>/%q<postnum> %([if(not(u(game_config,bbs,auto_timeout)),No System Timeout,switch(u(setr`%va,showtimeout,u(FUN`GETTIMEOUT,%q<bb>,%q<post>)),X,No Timeout,>0,etime(%q<showtimeout>),Timed Out!))]%),35)Posted[space(8)]Author%r[ljust(get(%2/~`%q<post>`HDR),35)][ljust(if(u(setr`%va,secs,first(elements(u(setr`%va,details,get(%2/~`%q<post>`DETAILS)),4 3,|,%b))),u(fancyday`%va,%q<secs>,%#),elements(%q<details>,5,|)),14)][u(setq,namedisp,if(strlen(%q<anon>),if(%q<isadmin>,%([ansi(hx,if(isobjid(u(setr`%va,poster,elements(%q<details>,2,|))),u(moniker`%va,%q<poster>),elements(%q<details>,1,|) \(Deleted\)))]%),%q<anon>),if(isobjid(u(setr`%va,poster,elements(%q<details>,2,|))),u(moniker`%va,%q<poster>),elements(%q<details>,1,|) \(Deleted\))))][switch(%va,PennMUSH,left(%q<namedisp>,21),RhostMUSH,ljc(%q<namedisp>,21))]%R[u(SEPARATOR)];@pemit %#=get(%q<bb>/~`%q<post>);@select/inline t(u(nattr`%va,%q<bb>/~`%q<post>`COMM`*))=1,{@attach %!/INC`READ`SHOWCOMMS},0,{@pemit %#=u(footer)};th u(FUN`SETREAD,%#,%2,%q<post>) | |
| &INC`READ`SHOWCOMMS [u(cobj,bbs)]=@dolist/inline u(setr`%va,allcomms,u(sortattr`%va,u(lattr`%va,%q<bb>/~`%q<post>`COMM`*)))={@pemit %#=u(SEPARATOR,Comment #@ - Added [u(fancytime`%va,get(%q<bb>/##`ON),%#)]);@pemit %#=u(moniker`%va,get(%q<bb>/##`BYDB)) Commented:;@pemit %#=get(%q<bb>/##);@select/inline #@=words(%q<allcomms>),{@pemit %#=u(footer)}} | |
| &INC`COMMENT [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@attach %!/INC`CHECK`FINDPOST=%0,%2,%q<bb>;@check strlen(%3)=@attach %!/INC`MSG=ERROR: Comment contents empty!;th u(attrib_set`%va,%q<bb>,u(setr`%va,attr,~`%q<post>`COMM`[u(nextslot,%q<bb>,~`%q<post>`COMM)]),%3);&%q<attr>`BY %q<bb>=%n;&%q<attr>`BYDB %q<bb>=%:;&%q<attr>`ON %q<bb>=secs();&~`%q<post>`EDITED %q<bb>=secs();@select/inline t(%q<noannounce>)=0,{@attach %!/INC`ALERT=%0,%q<bbnum>,%q<bb>,{(New Comment added to [ucstr(%0)][if(strmatch(%0,GB),%b\([name(%q<gid1>)]\))] Message ([u(pueblize,u(setr`%va,messnum,%q<bbnum>/%q<postnum>),+[lcstr(%0)]read %q<messnum>[if(strmatch(%0,GB),=%q<gid1>)])]) '[get(%q<bb>/~`%q<post>`HDR)]' on '[name(%q<bb>)]' by %n)}} | |
| &INC`NEXT [u(cobj,bbs)]=th iter(%q<readgroups>,iter(u(setr`%va,listposts,u(FUN`LISTPOSTS,%i0))[u(setq`%va,getread,u(FUN`GETREAD,%#,%i0))],if(match(%q<getread>,%i0),,u(setq`%va,msg,%i0)[u(setq`%va,bb,%i1)][u(setq`%va,oldlist,%q<listposts>)][switch(%va,PennMUSH,ibreak(2),RhostMUSH,ibreak(0))])));@check isdbref(%q<bb>)=@attach %!/INC`MSG=There are no unread postings on the %q<sysname>.;th u(setq`%va,bbnum,get(%q<bb>/ORDER));th u(setq`%va,listposts,%q<oldlist>);@attach %!/INC`READ`SHOWPOST=%0,match(%q<listposts>,%q<msg>),%q<bb> | |
| &INC`NEW [u(cobj,bbs)]=@attach %!/INC`NEXT | |
| &INC`EDIT [u(cobj,bbs)]=@attach %!/INC`JAILCHECK;@select/inline %1=TEXT,{@attach %!/INC`EDIT`POST},TITLE,{@attach %!/INC`EDIT`POST},{@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@attach %!/INC`CHECK`FINDPOST=%0,%2,%q<bb>;@check or(%q<isadmin>,u(isadmin`%va,%#),strmatch(elements(u(setr`%va,details,get(%q<bb>/~`%q<post>`DETAILS)),2,|),%:))=@attach %!/INC`MSG=ERROR: You cannot edit that post.;@check strlen(before(%3,/))=@attach %!/INC`MSG=ERROR: No text entered to check for.;&~`%q<post> %q<bb>=edit(get(%q<bb>/~`%q<post>),before(%3,/),after(%3,/));&~`%q<post>`DETAILS %q<bb>=elements(%q<details>,1 2 3,|,|)|[secs()];@pemit %#=u(HEADER)%RMessage %q<bbnum>/%q<postnum> ([name(%q<bb>)]/%q<postnum>) now reads:%R[u(SUBHEADER)];@pemit %#=get(%q<bb>/~`%q<post>);@pemit %#=u(FOOTER)} | |
| &INC`REPLACE [u(cobj,bbs)]=@attach %!/INC`JAILCHECK;@select/inline %1=TEXT,{@attach %!/INC`REPLACE`POST},TITLE,{@attach %!/INC`REPLACE`POST},{@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@attach %!/INC`CHECK`FINDPOST=%0,%2,%q<bb>;@check or(%q<isadmin>,u(isadmin`%va,%#),strmatch(elements(u(setr`%va,details,get(%q<bb>/~`%q<post>`DETAILS)),2,|),%:))=@attach %!/INC`MSG=ERROR: You cannot edit that post.;@check strlen(%3)=@attach %!/INC`MSG=ERROR: No text entered to check for.;&~`%q<post> %q<bb>=%3;&~`%q<post>`DETAILS %q<bb>=elements(%q<details>,1 2 3,|,|)|[secs()];@pemit %#=u(HEADER)%RMessage %q<bbnum>/%q<postnum> ([name(%q<bb>)]/%q<postnum>) now reads:%R[u(SUBHEADER)];@pemit %#=get(%q<bb>/~`%q<post>);@pemit %#=u(FOOTER)} | |
| &INC`EDIT`POST [u(cobj,bbs)]=@check hasattr(%#/D`%0`NEW`BB)=@attach %!/INC`MSG=ERROR: You don't have a post in progress.;@check strlen(before(%3,/))=@attach %!/INC`MSG=ERROR: No text entered to check for.;&D`%0`NEW`%1 %#=edit(get(%#/D`%0`NEW`%1),before(%3,/),after(%3,/));@pemit %#=u(HEADER)%RMessage now reads:%R[u(SUBHEADER,get(%#/D`%0`NEW`TITLE))];@pemit %#=get(%#/D`%0`NEW`TEXT);@pemit %#=u(SUBHEADER) | |
| &INC`LEAVE [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,READ,1;@stop t(get(%q<bb>/MANDATORY))=@attach %!/INC`MSG=ERROR: Board is mandatory reading. Cannot leave it.;@stop u(FUN`GETOMIT,%#,%q<bb>)=@attach %!/INC`MSG=You have already left that board.;th u(FUN`SETOMIT,%#,%q<bb>,1);@attach %!/INC`MSG=You have removed yourself from the [name(%q<bb>)] board. | |
| &INC`JOIN [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,READ,1;@check u(FUN`GETOMIT,%#,%q<bb>)=@attach %!/INC`MSG=You are already watching this board.;th u(FUN`SETOMIT,%#,%q<bb>,0);@attach %!/INC`MSG=You have joined the [name(%q<bb>)] board. | |
| &FUN`GETOMIT [u(cobj,bbs)]=default(%0/D`BB`%1`OMIT,0) | |
| &FUN`SETOMIT [u(cobj,bbs)]=u(attrib_set`%va,%0,D`BB`%1`OMIT,%2) | |
| &INC`SCAN [u(cobj,bbs)]=@attach/nobreak %!/INC`SCAN`DOSCAN;@switch %0=BB,{@check cor(words(u(getproperty,%#,groups)),u(isadmin`%va,%#));@attach %!/INC`SCAN`GROUPSCAN} | |
| &INC`SCAN`DOSCAN [u(cobj,bbs)]=@check words(u(setr`%va,groups,u(FILTER,UNREADBB,%q<readgroups>,%b,%b,%#)))=@attach %!/INC`MSG=There are no unread postings on the [switch(%0,GB,%q<gname1> GBS,BBS)].;@dolist %q<groups>={@select/inline #@=1,{@pemit %#=u(HEADER,u(FUN`NAME,%0,,%q<gid1>) - Unread Postings)};th u(setq`%va,listposts,u(FUN`LISTPOSTS,##));@pemit %#=u(pueblize,u(moniker`%va,##) (#[u(setr`%va,bbnum,get(##/ORDER))]),+[lcstr(%0)]read %q<bbnum>[if(strmatch(%0,GB),=%q<gid1>)]): [u(setr`%va,num,words(u(setr`%va,unread,u(sortposts,setdiff(%q<listposts>,u(FUN`GETREAD,%#,##))))))] unread %([u(itemize`%va,iter(%q<unread>,u(pueblize,u(setr`%va,postnum,match(%q<listposts>,%i0)),+[lcstr(%0)]read %q<bbnum>/%q<postnum>[if(strmatch(%0,GB),=%q<gid1>)])),%b,and,\,)]%);&D`BBTOTAL %#=add(%q<num>,get(%#/D`BBTOTAL));@select/inline #@=words(%q<groups>),{@pemit %#=u(SUBHEADER,Total Unread: [get(%#/D`BBTOTAL)]);@wipe %#/D`BBTOTAL}} | |
| &INC`SCAN`GROUPSCAN [u(cobj,bbs)]=@check u(strfirstof`%va,u(getstat,%#,D`GROUP,ALLGB),1);@check words(u(setr`%va,allgroups,u(filter,LISTENGROUP,u(u(cobj,gms)/FUN`LISTGROUPS),%b,%b,%#)))=@attach %!/INC`MSG=There are no unread posts on the GBS.;@dolist %q<allgroups>={th u(setq`%va,gid1,##);th u(setq`%va,gname1,name(##));@check lmath(max,iter(u(filter,NOTOMIT,u(filter,CANREAD`GB,u(FUN`LISTGROUPS`GB,##),%b,%b,%#,##),%b,%b,%#),if(words(setdiff(u(setr`%va,listposts,u(FUN`LISTPOSTS,%i0)),u(FUN`GETREAD,%#,%i0))),1[ibreak(1)],0)));@attach %!/INC`MSG=Group '[u(pueblize,name(%i0),+group %i0)]' has unread posts! Type [u(pueblize,+gbscan [name(%i0)],+gbscan %i0)] to see which!} | |
| &FIL`LISTENGROUP [u(cobj,bbs)]=cand(elock(%0,%1),u(strfirstof`%va,u(getstat,%1,D`GROUP`%0,GB),1)) | |
| &INC`BRIEF [u(cobj,bbs)]=th iter(%q<readgroups>,iter(u(setr`%va,listposts,u(FUN`LISTPOSTS,%i0))[u(setq`%va,getread,u(FUN`GETREAD,%#,%i0))],if(match(%q<getread>,%i0),,u(setq`%va,msg,%i0)[u(setq`%va,bb,%i1)][u(setq`%va,oldlist,%q<listposts>)][switch(%va,PennMUSH,ibreak(2),RhostMUSH,ibreak(0))])));@select/inline strlen(%q<msg>)=>0,{@attach %!/INC`MSG=There are unread posts on the %0S!},{@attach %!/INC`MSG=There is nothing unread on the %0S.};@switch %0=BB,{@check cor(words(u(getproperty,%#,groups)),u(isadmin`%va,%#));@attach %!/INC`SCAN`GROUPSCAN} | |
| &INC`LIST [u(cobj,bbs)]=@pemit %#=u(HEADER,u(FUN`NAME,%0,,%q<gid1>))%r[ansi(u(color`%va,%#,BBS,COLUMN_NAMES),align(36 8 20 8,Available Bulletin Board Groups,Member?,Timeout,Capacity))]%r[u(SEPARATOR,)];@dolist %q<visigroups>={@pemit %#=align(5 31 -7 20 12,%b[get(##/ORDER)],u(moniker`%va,##),switch(default(%#/D`BB`##`OMIT,0),0,Yes,No),if(u(FUN`CONFIG,##,timeout),etime(u(FUN`CONFIG,##,timeout)),none),rjust(u(nattr`%va,##/~`*),4,0)/[switch(add(2,strlen(default(##/NEXT,1))),1,1800?,2,1800?,3,1800?,4,1600?,5,1300?,6,1100?,7,1000?,8,900?,9,800?,10,700?,11,600?,12,500?,13,400?)]);@select/inline #@=words(%q<visigroups>),{@pemit %#=u(SEPARATOR)%RTo join boards, type '+[lcstr(%0)]join <board number>'%RTo leave boards, type '+[lcstr(%0)]leave <board number>'%R[u(SUBHEADER)]}} | |
| &INC`CATCHUP [u(cobj,bbs)]=@check strlen(%1)=@attach %!/INC`MSG=ERROR: No board entered to catchup.;@select/inline %1=ALL,{@dolist/inline %q<readgroups>={@attach %!/INC`DOCATCHUP=##};@attach %!/INC`MSG=All postings on all %q<sysname> boards marked as read.},ALLGROUP,{@dolist/inline getproperty(%#,GROUPS)={th u(setq`%va,gid1,##);@attach %!/INC`CATCHUP=GB,ALL}},{@dolist/delimit , %1={@attach %!/INC`CHECK`FINDBB=%0,trim(##),READ;@attach %!/INC`DOCATCHUP=%q<bb>;@attach %!/INC`MSG=All postings on board [name(%q<bb>)] marked as read.}} | |
| &INC`DOCATCHUP [u(cobj,bbs)]=@select/inline t(get(%0/MANDATORY))=0,{th u(FUN`SETREAD,%#,%0,u(FUN`LISTPOSTS,%0))},1,{@attach %!/INC`MSG=Cannot catchup for Mandatory Board [name(%0)]} | |
| &INC`MOVE [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@attach %!/INC`CHECK`FINDPOST=%0,%2,%q<bb>;@check cor(%q<isadmin>,u(isadmin`%va,%#),strmatch(elements(u(setr`%va,details,get(%q<bb>/~`%q<post>`DETAILS)),2,|),%:))=@attach %!/INC`MSG=ERROR: You cannot move that post.;@check strlen(%3)=@attach %!/INC`MSG=ERROR: No destination board entered.;th u(setq`%va,oldbb,%q<bb>);@attach %!/INC`CHECK`FINDBB=%0,%3,WRITE;th u(setq`%va,next,u(baseconv`%va,u(setr`%va,id,default(%q<bb>/NEXT,1)),10,36));&NEXT %q<bb>=add(%q<id>,1);@attach %!/INC`MVTREE=%q<oldbb>,~`%q<post>,%q<bb>,~`%q<next>;@pemit %#=Message '%q<postnum>' moved from Board '[name(%q<oldbb>)]' to Board '[name(%q<bb>)]' | |
| &INC`CONFIG [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@select/inline strlen(%2)=0,{@attach %!/INC`CONFIG`BOARD`SHOW},{@attach %!/INC`PARTIAL=%2,anonymous|timeout[switch(%0,BB,|mandatory)],|,parameter,parameter;@select/inline strlen(%3)=0,{@attach %!/INC`MSG=%q<parameter> for Board [name(%q<bb>)] cleared.;&%q<parameter> %q<bb>},{@attach %!/INC`CONFIG`BOARD`%q<parameter>;@attach %!/INC`MSG=%q<parameter> for Board [name(%q<bb>)] set to: [u(strfirstof,%q<entrytype>,%3)].;&%q<parameter> %q<bb>=u(strfirstof`%va,%q<entry>,%3)}} | |
| &INC`CONFIG`BOARD`SHOW [u(cobj,bbs)]=@pemit %#=u(HEADER,%q<sysname> - [name(%q<bb>)] Board Settings);@pemit %#=TIMEOUT: [u(strfirstof`%va,u(FUN`CONFIG,%q<bb>,timeout),0)] [if(u(FUN`CONFIG,%q<bb>,timeout),- [etime(u(FUN`CONFIG,%q<bb>,timeout))])] [if(strlen(get(%q<bb>/TIMEOUT)),- Using Board Setting,- Using Global Default)];@pemit %#=ANONYMOUS: [default(%q<bb>/ANONYMOUS,<unset>)];@pemit %#=MANDATORY: [t(get(%q<bb>/MANDATORY))];@pemit %#=u(SUBHEADER) | |
| &INC`CONFIG`BOARD`TIMEOUT [u(cobj,bbs)]=@check strlen(u(setr`%va,entry,u(stringsecs`%va,u(setr,entrytype,regeditalli(%3,^\\d+$,$0D)))))=@attach %!/INC`MSG=ERROR: Entry doesn't convert properly. Check [u(pueblize,help stringsecs)] for proper format. | |
| &INC`CONFIG`BOARD`ANONYMOUS [u(cobj,bbs)]=@check strlen(%3)=@attach %!/INC`MSG=ERROR: Anonymous entry must be a string. | |
| &INC`CONFIG`BOARD`MANDATORY [u(cobj,bbs)]=@check match(1 0,%3)=@attach %!/INC`MSG=ERROR: Mandatory must be a bool (1 or 0). | |
| &INC`CONFIG`POST`TIMEOUT [u(cobj,bbs)]=@check strlen(u(setr`%va,entry,u(stringsecs`%va,u(setr,entrytype,regeditalli(%3,^\\d+$,$0D)))))=@attach %!/INC`MSG=ERROR: Entry doesn't convert properly. Check [u(pueblize,help stringsecs)] for proper format. | |
| &INC`TIMEOUT [u(cobj,bbs)]=@select/inline strlen(%1)=0,{@attach %!/INC`LIST},{@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@select/inline t(strlen(%2))=1,{@check words(u(setr`%va,processed,u(filter,ISAPOST,u(setr`%va,orig,u(FUN`MESSLIST,%#,%q<bb>,%2,%q<listposts>)),%b,%b,%q<listposts>)))=@attach %!/INC`MSG=ERROR: No posts to change timeouts.;@select/inline gt(words(u(setr`%va,cannot,sort(setdiff(%q<processed>,%q<orig>)))),0)=1,{@attach %!/INC`MSG=Could not change timeout for posts: [u(itemize`%va,%q<cannot>,%b,and,\,)]};@check strlen(%3)=@attach %!/INC`MSG=ERROR: No new timeout entered!;@select/inline %3=0,{@check %q<isadmin>=@attach %!/INC`MSG=Only admin may set a timeout of 0.;th u(setq`%va,entry,0)},{@attach %!/INC`CONFIG`POST`TIMEOUT};@select/inline %q<isadmin>=0,{@stop gt(%q<entry>,u(FUN`CONFIG,%q<bb>,Timeout))=@attach %!/INC`MSG=ERROR: Cannot set a post's timeout greater than a board's timeout.};@dolist %q<processed>={@select/inline %q<isadmin>=0,{@stop get(%q<bb>/~`[elements(%q<listposts>,##)]`NOTIMEOUT)=@attach %!/INC`MSG=ERROR: Only admin may apply timeouts to static posts.};@select/inline %q<entry>=0,{th u(attrib_set`%va,%q<bb>,~`[elements(%q<listposts>,##)]`TIMEOUT,u(FUN`CONFIG,%q<bb>,Timeout));th u(attrib_set`%va,%q<bb>,~`[elements(%q<listposts>,##)]`NOTIMEOUT,1)},{th u(attrib_set`%va,%q<bb>,~`[elements(%q<listposts>,##)]`TIMEOUT,%q<entry>);th u(attrib_set`%va,%q<bb>,~`[elements(%q<listposts>,##)]`NOTIMEOUT,0)};@attach %!/INC`MSG=Timeout for %q<bbnum>/## set to: [if(%q<entry>,etime(%q<entry>),Static)]!}},{th u(setq`%va,getread,u(FUN`GETREAD,%#,%q<bb>));th u(setq`%va,anon,get(%q<bb>/ANONYMOUS));@pemit %#=u(HEADER,u(fun`name,%0,%q<bb>,%q<gid1>) - Timeouts)%r[space(8)]Message[space(28)]Timeout[space(9)]By;@dolist u(setr`%va,posts,%q<listposts>)={@pemit %#=ljust(u(pueblize,%q<bbnum>/[match(%q<posts>,##)],+[lcstr(%0)]read %q<bbnum>/[match(%q<posts>,##)][switch(%0,GB,=%q<gid1>)]),6)[ljust(if(match(%q<getread>,##),,U),2)][ljust(get(%q<bb>/~`##`HDR),35)][ljust(switch(u(setr`%va,ptime,u(FUN`GETTIMEOUT,%q<bb>,##)),X,No Timeout,>0,etime(%q<ptime>),Timed Out),16)][u(setq`%va,details,get(%q<bb>/~`##`DETAILS))][u(setq,namedisp,if(t(strlen(%q<anon>)),%q<anon>[if(%q<isadmin>,%B%([if(isobjid(u(setr`%va,poster,elements(%q<details>,2,|))),u(moniker`%va,%q<poster>),elements(%q<details>,1,|) \(Deleted\))]%))],if(isobjid(u(setr`%va,poster,elements(%q<details>,2,|))),u(moniker`%va,%q<poster>),elements(%q<details>,1,|) \(Deleted\))))][switch(%va,PennMUSH,left(%q<namedisp>,21),RhostMUSH,ljc(%q<namedisp>,21))];@select/inline eq(words(%q<posts>),#@)=1,{@pemit %#=u(HEADER,Board Timeout: [switch(u(setr`%va,btime,u(FUN`CONFIG,%q<bb>,timeout)),0,No Timeout,etime(%q<btime>))])}}}} | |
| &STARTUP [u(cobj,bbs)]=@trigger %!/LOOP`TIMEOUT;@trigger %!/LOOP`MANDATORY | |
| &LOOP`TIMEOUT [u(cobj,bbs)]=th u(setq`%va,interval,u(game_config,bbs,interval));@select/inline u(game_config,bbs,auto_timeout)=1,{@select/inline gte(sub(secs(),u(setr`%va,lastrun,v(LASTRUN))),%q<interval>)=1,{&LASTRUN %!=secs();@dolist u(FUN`ALLBOARDS)={@wait #@={@trigger %!/LOOP`TIMEOUT`BOARD=##,%q<interval>}}},0,{}};@wait %q<interval>=@trigger %!/LOOP`TIMEOUT | |
| &LOOP`TIMEOUT`BOARD [u(cobj,bbs)]=@dolist u(FUN`LISTPOSTS,%0)={@select/inline u(setr`%va,timeout,u(FUN`GETTIMEOUT,%0,##))=X,{},>0,{&~`##`TIMEOUT %0=sub(%q<timeout>,%1)},<=0,{@attach %!/WIPE=%0,~`##}} | |
| &FUN`ALLBOARDS [u(cobj,bbs)]=setunion(u(FUN`LISTGROUPS`BB),if(isdbref(u(cobj,gms)),iter(u(u(cobj,gms)/FUN`LISTGROUPS),u(FUN`LISTGROUPS`GB,%i0)))) | |
| &LOOP`MANDATORY [u(cobj,bbs)]=@select/inline words(u(setr`%va,mandatory,u(filter,MANDATORY,u(setr`%va,allboards,u(FUN`LISTGROUPS`BB)))))=>0,{@dolist/inline setunion(lwho(),)={@wait #@={@trigger %!/LOOP`MANDATORY`PERSON=##,%q<mandatory>,%q<allboards>}}};@wait u(game_config,bbs,mandatory)={@trigger %!/LOOP`MANDATORY} | |
| &LOOP`MANDATORY`PERSON [u(cobj,bbs)]=@stop u(isguest,%0);@select/inline words(u(setr`%va,unr,u(filter,CANREAD`BB,u(filter,UNREADBB,%1,%b,%b,%0),%b,%b,%0)))=>0,{@attach %!/INC`MSG=There are unread posts on MANDATORY boards [u(itemize`%va,iter(%q<unr>,[u(pueblize,get(%i0/ORDER) - [u(moniker`%va,%i0)],+bbread %i0)],%b,|),|,and,\,)],%0} | |
| &FIL`MANDATORY [u(cobj,bbs)]=t(get(%0/MANDATORY)) | |
| &INC`LOCK [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@attach %!/INC`PARTIAL=%2,read|write,|,lock,lock;@select/inline %0=BB,{@select/inline isdbref(u(cobj,lms))=1,{@check strlen(%3)=@attach %!/INC`MSG=ERROR: No lock string entered. See [u(pueblize,+help +key)] for more information.;@attach u(cobj,lms)/INC`GENLOCK=%3,BASIC},0,{@attach %!/INC`VALID`LOCK=%3};@force %!=@lock/[switch(%q<lock>,read,basic,write,enter)] %q<bb>=%q<value>;@attach %!/INC`MSG=You set the %q<lock> Lock on Board [name(%q<bb>)] to: %3.},GB,{@check u(valnum,%3)=@attach %!/INC`MSG=ERROR: %q<lock> Lock must be a number!;@stop lte(%3,u(u(cobj,gms)/FUN`GETRANK,%q<gid1>,%:))=@attach %!/INC`MSG=ERROR: Cannot raise the %q<lock> Lock beyond your own rank.;@check hasattrp(%q<gid1>/RANK`[u(setr`%va,entry,abs(%3))])=@attach %!/INC`MSG=ERROR: Cannot find that rank.;&CAN%q<lock> %q<bb>=%q<entry>;@attach %!/INC`MSG=You set the %q<lock> Lock on Group Board [name(%q<bb>)] to: Rank %q<entry> or higher.} | |
| &INC`UNLOCK [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@attach %!/INC`PARTIAL=%2,read|write,|,lock,lock;@select/inline %0=BB,{@force %!=@unlock/[switch(%q<lock>,read,basic,write,enter)] %q<bb>;@attach %!/INC`MSG=You release the %q<lock> Lock on [name(%q<bb>)]},GB,{@check lte(get(%q<bb>/CAN%q<lock>),u(u(cobj,gms)/FUN`GETRANK,%q<gid1>,%:))=@attach %!/INC`MSG=ERROR: Cannot release a %q<lock> Lock that's beyond your own rank.;@attach %!/WIPE=%q<bb>,CAN%q<lock>;@attach %!/INC`MSG=You release the %q<lock> Lock on [name(%q<bb>)]} | |
| &INC`MYR`FINDBBP [u(cobj,bbs)]=@select/inline isdbref(get(%#/BBPOCKET))=1,{@check cand(hasattr(get(%#/BBPOCKET)/groups),hasattr(get(%#/BBPOCKET)/version))=@pemit u(RFN`MSGHEAD,%q<sysname>) ERROR: DBREF in BBPOCKET is not a Myrddin BBS BBpocket!;th u(setq`%va,bbp,get(%#/BBPOCKET))},0,{@check words(u(setr`%va,bbp,u(choosegame,lsearch(all,ething,\[cand(strmatch(name(##),bbpocket),hasattr(##/version),hasattr(##/groups))\]),search(ETHING=\[cand(strmatch(name(##),bbpocket),hasattr(##/version),hasattr(##/groups))\]))))=@attach %!/INC`MSG=ERROR: BBpocket not found.;@stop gt(words(%q<bbp>),1)=@attach %!/INC`MSG=ERROR: Search turned up multiple bbpockets: %q<bbp>} | |
| &INC`MYR`TRANSFER [u(cobj,bbs)]=@dolist u(setr`%va,list,u(sortposts,get(%1/MESS_LST)))={@select/inline %0=BB,{th u(setq`%va,next,u(baseconv`%va,default(%2/NEXT,1),10,36));&NEXT %2=add(default(%2/NEXT,1),1)},GB,{};th u(setq`%va,head,get(%1/HDR_##));&~`%q<next> %2=get(%1/BDY_##);&~`%q<next>`DETAILS %2=[elements(%q<head>,3,|)]|[objid(elements(%q<head>,4,|))]|[switch(words(elements(%q<head>,2,|)),3,#-1,4,convtime(elements(elements(%q<head>,2,|),1 2 3) 00:00:00 [elements(elements(%q<head>,2,|),4)]))]||[elements(%q<head>,2,|)];&~`%q<next>`HDR %2=elements(%q<head>,1,|);&~`%q<next>`TIMEOUT %2=if(u(FUN`CONFIG,%2,TIMEOUT),u(FUN`CONFIG,%2,TIMEOUT),0)} | |
| &INC`IMPORT [u(cobj,bbs)]=@attach %!/INC`MYR`FINDBBP;@check strlen(%1)=@attach %!/INC`MSG=ERROR: No Old Board number entered to convert from.;@check isdbref(u(setr`%va,oldbb,elements(get(%q<bbp>/groups),%1)))=@attach %!/INC`MSG=ERROR: Old Board not found.;@attach %!/INC`VERIFY={[ansi(hr,WARNING:)] This will attempt to import Old Myrddin Board %1: [name(%q<oldbb>)]. A new, unlocked board with the same name will be created and posts copied/converted. Please enter the same command again within ten seconds to verify.},%q<sysname> IMPORT %1;@attach %!/INC`NEWGROUP=%0,name(%q<oldbb>);@trigger %!/INC`MYR`TRANSFER=%0,%q<oldbb>,%q<bb>;@attach %!/INC`MSG=Conversion of [words(%q<list>)] messages (hopefully) complete! | |
| &INC`TRANSFER [u(cobj,bbs)]=@attach %!/INC`MYR`FINDBBP;@check strlen(%1)=@attach %!/INC`MSG=ERROR: No Old Board number entered to convert from.;@check isdbref(u(setr`%va,oldbb,elements(get(%q<bbp>/groups),%1)))=@attach %!/INC`MSG=ERROR: Old Board not found.;@attach %!/INC`CHECK`FINDBB=%0,%3,WRITE;@attach %!/INC`VERIFY={[ansi(hr,WARNING:)] This will attempt to transfer messages from Old Myrddin Board %1: [name(%q<oldbb>)] to New BB: [name(%q<bb>)]. Please enter the same command again within ten seconds to verify.},%q<sysname> TRANSFER %q<oldbb> %q<bb>;@trigger %!/INC`MYR`TRANSFER=%0,%q<oldbb>,%q<bb>;@attach %!/INC`MSG=Conversion of [words(%q<list>)] messages (hopefully) complete! | |
| &INC`CONVERT [u(cobj,bbs)]=@attach %!/INC`MYR`FINDBBP;@attach %!/INC`VERIFY={[ansi(hr,WARNING:)] This will attempt to COMPLETELY CONVERT the old Myrddin Board to the new BB, creating boards and copying posts in order. Please be VERY SURE you want to do this by entering the same command again within ten seconds.},%q<sysname> CONVERT %q<bbp>;@attach %!/INC`MSG=Okay! Beginning conversion. This will take approximately [u(setr`%va,time,mul(2,words(get(%q<bbp>/groups))))] Seconds to complete.;@dolist u(filter,isdbref,get(%q<bbp>/groups))={@wait #@={@attach %!/INC`NEWGROUP=%0,name(##);@attach %!/INC`MSG=Converting Board #@: [name(##)]...;@trigger %!/INC`MYR`TRANSFER=%0,##,%q<bb>}};@wait add(%q<time>,2)=@attach %!/INC`MSG=Conversion process complete. | |
| &INC`ORDER [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,ADMIN;@check u(valnum,%3)=@attach %!/INC`MSG=ERROR: Order must be a positive integer.;&ORDER %q<bb>=%3;@attach %!/INC`MSG=The board order was changed! | |
| &INC`RENAME [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@check strlen(%3)=@attach %!/INC`MSG=ERROR: New name field empty.;@check valid(name,%3)=@attach %!/INC`MSG=ERROR: Not a suitable object name. Please try something simpler - perhaps without fancy characters?;@stop isdbref(u(find_in`%va,switch(%0,BB,u(bbs-db),GB,%q<gid1>),trim(%3)))=@attach %!/INC`MSG=ERROR: A board already has that name.;@attach %!/INC`MSG=You renamed Board [name(%q<bb>)] to: %3;@name %q<bb>=%3 | |
| @@ &INC`SEARCH [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@attach %!/INC`CHECKPC=%3,1,%q<sysname>;@check words(u(setr`%va,posts,iter(grepi(%q<bb>,*`BYDB,%q<t1objid>),first(%i0,`))))=@attach %!/INC`MSG=No posts by %q<t1name> on [name(%q<bb>)].;@pemit %#=u(HEADER,BBS - [name(%q<bb>)])%r[space(8)]Message[space(28)]Posted[space(8)]By;@dolist/inline %q<posts>={@pemit %#=ljust(u(pueblize,%q<bbnum>/[match(u(FUN`LISTPOSTS,%q<bb>),%i0)],+[lcstr(%0)]read %q<bbnum>/[match(u(FUN`LISTPOSTS,%q<bb>),%i0)]),6)[ljust(u(u(bbs)/FUN`MSGFLAG,%#,%q<bb>,%i0),2)][ljust(get(%q<bb>/%i0`HDR),35)][ljust(timefmt($b $d $Y,lmath(max,firstof(get(%q<bb>/%i0`EDITED),get(%q<bb>/%i0`ON)))),14)][left(if(get(u(bbs-db)/BB`%q<bb>`ANONYMOUS),if(%q<isadmin>,([ansi(hx,get(%q<bb>/%i0`BY))]),default(u(bbs-db)/BB`%q<bb>`ANONYMOUS,Anonymous)),get(%q<bb>/%i0`BY)),21)]};@pemit %#=u(HEADER) | |
| @@ MIGRATION TOOl | |
| &MIGRATE`BBS [u(cobj,migrate)]=@check isdbref(u(setr`%va,bdb,u(%q<index>/bbs-db)))=@attach %!/INC`MSG=ERROR: Cannot find 1.0 BBS Database <BBS-DB>. Cannot continue.;@dolist/inline u(setr`%va,first,u(filter,isdbref,get(%q<bdb>/groups)))={@wait #@=@trigger %!/MIGRATE`BBS`BOARD=BB,##,#@};@wait add(2,words(%q<first>))=@trigger %!/MIGRATE`BBS`GROUPS | |
| &MIGRATE`BBS`BOARD [u(cobj,migrate)]=@attach u(cobj,bbs)/INC`NEWGROUP=%0,name(%1);&ORDER %q<bb>=%2;@cpattr %q<bdb>/BB`%1`NEXT=%q<bb>/NEXT;@cpattr %q<bdb>/BB`%1`ANONYMOUS=%q<bb>/ANONYMOUS;@cpattr %q<bdb>/BB`%1`TIMEOUT=%q<bb>/TIMEOUT;@select/inline strmatch(*UNLOCKED*,lock(%1/Read))=0,{@lock %q<bb>=edit(lock(%1/READ),/MEMBER,/BASIC)};@select/inline strmatch(*UNLOCKED*,lock(%1/Write))=0,{@lock/enter %q<bb>=edit(lock(%1/WRITE),/MEMBER,/BASIC)};@dolist/inline u(lattr`%va,%1/*)={@cpattr %1/%i0=%q<bb>/~`%i0;@cpattr %1/%i0`HDR=%q<bb>/~`%i0`HDR;@cpattr %1/%i0`TIMEOUT=%q<bb>/~`%i0`TIMEOUT;@cpattr %1/%i0`NOTIMEOUT=%q<bb>/~`%i0`NOTIMEOUT;&~`%i0`DETAILS %q<bb>=u(filter,STRLEN,get(%1/%i0`BY)|[get(%1/%i0`BYDB)]|[get(%1/%i0`ON)]|[get(%1/%i0`EDITED)],|,|)} | |
| &MIGRATE`BBS`GROUPS [u(cobj,migrate)]=@dolist/inline if(isdbref(u(cobj,gms)),u(u(cobj,gms)/FUN`LISTGROUPS))={@wait #@=@trigger %!/MIGRATE`BBS`GROUP=##}; | |
| &MIGRATE`BBS`GROUP [u(cobj,migrate)]=th u(setq`%va,gid1,%0);@dolist get(%0/BOARDS)={@tel %i0=[u(cobj,oldbox)];@attach u(cobj,bbs)/INC`NEWGROUP=GB,name(%i0);&ORDER %q<bb>=inum(0);@cpattr %q<bdb>/BB`%i0`ANONYMOUS=%q<bb>/ANONYMOUS;@cpattr %q<bdb>/BB`%i0`NEXT=%q<bb>/NEXT;@cpattr %q<bdb>/BB`%i0`TIMEOUT=%q<bb>/TIMEOUT;@cpattr %q<bdb>/BB`%i0`GREAD=%q<bb>/CANREAD;@cpattr %q<bdb>/BB`%i0`GWRITE=%q<bb>/CANWRITE;@dolist/inline u(lattr`%va,%i0/*)={@cpattr %i1/%i0=%q<bb>/~`%i0;@cpattr %i1/%i0`HDR=%q<bb>/~`%i0`HDR;@cpattr %i1/%i0`TIMEOUT=%q<bb>/~`%i0`TIMEOUT;@cpattr %i1/%i0`NOTIMEOUT=%q<bb>/~`%i0`NOTIMEOUT;&~`%i0`DETAILS %q<bb>=u(filter,STRLEN,get(%i1/%i0`BY)|[get(%i1/%i0`BYDB)]|[get(%i1/%i0`ON)]|[get(%i1/%i0`EDITED)],|,|)}} | |
| &CONFLICT`BBS [u(cobj,migrate)]=@dolist/inline u(coi,bbs)={@set %i0=NO_COMMAND HALT;@tel %i0=u(cobj,oldbox)} | |
| &FIL`STRLEN [u(cobj,migrate)]=t(strlen(%0)) | |
| @@ COMMUNICATIONS - BBS | |
| +help/add BBS=[u(cobj,bbs)]/HLP`BBS | |
| +help/category BBS=Communications | |
| +help/metatags BBS=Myrddin boards messages posts | |
| &HLP`BBS [u(cobj,bbs)]=The BBS is a global, multi-threaded board with a rich set of features that grew from a rewrite of Myrddin's classical BBS. It shares almost identical command syntax and appearance.%R%R[ansi(hc,Reading Posts)]%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bbread)] - Show all message boards.%R[ansi(h,+bbread <board>)] - Shows a board's messages. <board> can be its name \(supports partial matches\) or number.%R[ansi(h,+bbread <board>/<list>)] - Read a message. <list> is comma-seperated. Entries can be single numbers\, number ranges \(ie. 1-6\)\, and u \(for 'all unread'\)\, in any combination or order - duplicates will not be shown.%R[ansi(h,+bbnext)] - shows first available unread message.%R[ansi(h,+bbnew)] - Same as +bbnext.%R[ansi(h,+bbcatchup <board>)] - Mark all messages on a board read. +bbcatchup ALL sets ALL boards 'read.'%R[ansi(h,+bbscan)] - Lists unread messages.)]%R%R[ansi(hc,Writing Posts)]%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bbpost <board>/<title>)] - Begins writing a post.%R[ansi(h,+bbwrite <text>)] - Writes to post in progress. [ansi(h,+bb <text>)] also works.%R[ansi(h,+bbproof)] - Show post in progress.%R[ansi(h,+bbedit <type>=<search>/<replace>)] - Edits post in progress. <type> must be TEXT or TITLE. Any text matching <search> will be replaced with <replace>.%R[ansi(h,+bbtoss)] - Erases a post in progress.%R[ansi(h,+bbpost)] - Submits finalized post.%R[ansi(h,+bbpost <board>/<title>=<text>)] - Quick posts to a board.%R[ansi(h,+bbedit <board>/<#>=<search>/<replace>)] - Edits a post on the board. Must be original poster or staff.%R[ansi(h,+bbmove <board>/<#>=<board>)] - Relocates a post. Must be original poster or staff.%R[ansi(h,+bbremove <board>/<list>)] - Removes a list of posts. <list> works like with +bbread. Must be original poster or staff.)]%R%R[ansi(hc,Board Membership)]%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bblist)] - Shows all visible boards.%R[ansi(h,+bbleave <board>)] - Leave a board. You won't hear notices from it.%R[ansi(h,+bbjoin <board>)] - Re-join a board you've left.)] | |
| +help/add BBS/Timeouts=[u(cobj,bbs)]/HLP`BBS`TIMEOUTS | |
| &HLP`BBS`TIMEOUTS [u(cobj,bbs)]=The BBS supports timeouts by global scale, board scale, and individual post scale.%R%R[ansi(hc,Duration Entries)]%R[align(5 [sub(u(width`%va,%#),6)],,Anything that requires a <duration> lets you use a stringsecs compatible \([u(pueblize,help stringsecs)]\) entry. Example: 7w 5m \(for 7 weeks\, 5 minutes\) or 30d \(30 days\).)]%R%R[ansi(hc,Global Timeouts)]%R[align(5 [sub(u(width`%va,%#),6)],,The Global timeouts are configured by staff in +gameconfig.)]%R%R[ansi(hc,Board Timeouts)]%RThese commands are staff only.%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bbconfig <board>/timeout=<duration>)] - Default timeout for posts on <board>. Set 0 for no timeout. Set null to use global default.)]%R%R[ansi(hc,Post Timeouts)]%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bbtimeout <board>/<list>=<duration>)] - Change timeout for a list of posts. Players can only change for their own posts\, and only less than board's timeout. Admin may change any post's timeout\, and set a post static by setting it to 0.)] | |
| +shelp/add BBS=[u(cobj,bbs)]/SHLP`BBS | |
| +shelp/category BBS=Communications | |
| &SHLP`BBS [u(cobj,bbs)]=These commands are staff only.%R%R[ansi(hc,Managing Boards)]%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bbnewgroup <name>)] - Creates a new board.%R[ansi(h,+bbcleargroup <board>)] - Deletes a board and all posts.%R[ansi(h,+bborder <board>=<#>)] - All boards have an ORDER # that's used to sort them. This is not the same as the number displayed in +bbread but can be used to change them.%R[ansi(h,+bbconfig <board>/<parameter>=<value>)] - Sets a board's <option> to <value>. Entering no <value> clears the option. Available Options:)]%R[align(10 67,,[ansi(h,anonymous)] - Set to <name> makes all posts appear to be from <name> as long as it's set. Admin still see real poster.%R[ansi(h,timeout)] - See [u(pueblize,+help BBS/Timeouts)]%R[ansi(h,mandatory)] - Set to 1 or 0. Boards set mandatory cannot be targeted with bbcatchup and will periodically alert people of unread messages. Configure the alert interval in +gameconfig.)]%R%R[ansi(hc,Importing from Myrddin)]%RWIZARD ONLY! These commands could seriously damage the boards if misused or problems occur. It's recommended you make a backup of the game before using these! These commands were designed and tested solely for Myrddin's BBS version 4.0.6 with the yearly patch from MUSHcode.com. Any mods to how posts are STORED \(but not displayed\) could cause this to fail. You're on your own with these commands.%R%RThese commands will attempt to locate a bbpocket. If a game has multiple bbpockets\, set a BBPOCKET attribute on yourself containing its dbref via &BBPOCKET me=<dbref>.%R%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bbimport <oldboard#>)] - Converts a single old Board object's messages and reposts them in order on a new board.%R[ansi(h,+bbtransfer <oldboard#>=<board>)] - Copy messages from an old board to a specific board in order of posting.%R[ansi(h,+bbconvert)] - Converts an entire Myrddin's BBS. Boards are created in order and added to existing list\, all posts converted. Note that board locks and settings are NOT converted in the process\, and you might end up with boards of the same name when it's done depending on how you started.)] | |
| +shelp/add BBS/Locks=[u(cobj,bbs)]/SHLP`BBS`LOCKS | |
| &SHLP`BBS`LOCKS [u(cobj,bbs)]=BBS boards can be locked so that only certain people may see or post to them. A board set for only ADMIN to write but anyone may read could serve as public announcements. A board set to only one group able to WRITE and READ is a private board. The BBS locks rely on the Key Types made with +key! Only Admin may use these commands!%R[ansi(hc,See Also:)] [u(pueblize,+help +key)]%R%R[ansi(hc,Locktypes)]%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,write)] - Controls who may post to a board.%R[ansi(h,read)] - Controls who can see a board and read its posts. Boards you cannot see will not be displayed on +bbread!)]%R%R[ansi(hc,Managing BBLocks)]%R[align(5 [sub(u(width`%va,%#),6)],,[ansi(h,+bblock <board>/<locktype>=<Key Types>)] - Locks Board. <lock> can be READ or WRITE. Examples: +bblock 4/WRITE=ADMIN%R[ansi(h,+bbunlock <board>/<locktype>)] - Unlocks a board.%R%RIf the Lock Manager System is NOT installed\, you can still use these commands: they will set locks using the game's built-in @lock logic.%R%RNOTE: Read and Write are abstractions. The actual locks are the Basic @lock and @lock/enter\, respectively. For Group boards the rank number is stored on the CANREAD and CANWRITE attributes.)] |