+bbnew Code

&BBNEW BBS - Myrddin's Global BBS=$+bbnew:think [setr(0,first(iter(u([v(bbpocket)]/valid_groups,%#,read),switch(trim(u([v(bbpocket)]/unreadnums,%#,##)),,,##))))];@switch [words(r(0))]=0,@pemit %#=No unread messages on any board.,{think [setq(4,member(get([v(bbpocket)]/groups),%q0))][setq(5,first(u([v(bbpocket)]/unreadnums,%#,%q0)))];@switch [and(lte(%q5,words(get(%q0/MESS_LST))),isnum(%q5))]=0,{@pemit %#=No new messages beyond %q4/[setr(6,add(after(%0,/),0))] ([name(%q0)]/%q6).},{@pemit %#=[center(= [name(%q0)] =,78,=)]%r[ljust(Message: %q4/%q5[switch(u([v(bbpocket)]/fn_timeout_close,index(setr(3,get(%q0/HDR_[extract(get(%q0/MESS_LST),%q5,1)])),|,5,1)),1,{%b(timeout warning)})],35)]Posted[space(8)]Author%r[ljust(index(%q3,|,1,1),35)][ljust(index(%q3,|,2,1),14)][mid([index(%q3,|,3,1)][ifelse(and(hasattr(%q0,anonymous),hasflag(%#,wizard)),%b\([name(index(%q3,|,4,1))]\),)],0,29)]%r[repeat(-,78)]%r[get(%q0/BDY_[extract(get(%q0/MESS_LST),%q5,1)])]%r[repeat(=,78)]; &bb_read %#=[setunion(get(%#/bb_read),[extract(get(%q0/MESS_LST),%q5,1)])]}}

&BBNEW2 BBS - Myrddin's Global BBS=$+bbnew *:@switch member(u([v(bbpocket)]/valid_groups,%#,read),setr(0,u([v(bbpocket)]/get_group,setr(2,first(%0,/)))))=0,{@pemit %#=[switch(%q0,#-2,That group name is not specific enough.,You do not subscribe to that group.)]},{think [setq(4,member(get([v(bbpocket)]/groups),%q0))][setq(5,first(iter(u([v(bbpocket)]/unreadnums,%#,%q0),switch(gte(##,after(%0,/)),1,##))))];@switch [and(lte(%q5,words(get(%q0/MESS_LST))),isnum(%q5))]=0,{@pemit %#=No new messages beyond %q4/[setr(6,add(after(%0,/),0))] ([name(%q0)]/%q6).},{@pemit %#=[center(= [name(%q0)] =,78,=)]%r[ljust(Message: %q4/%q5[switch(u([v(bbpocket)]/fn_timeout_close,index(setr(3,get(%q0/HDR_[extract(get(%q0/MESS_LST),%q5,1)])),|,5,1)),1,{%b(timeout warning)})],35)]Posted[space(8)]Author%r[ljust(index(%q3,|,1,1),35)][ljust(index(%q3,|,2,1),14)][mid([index(%q3,|,3,1)][ifelse(and(hasattr(%q0,anonymous),hasflag(%#,wizard)),%b\([name(index(%q3,|,4,1))]\),)],0,29)]%r[repeat(-,78)]%r[get(%q0/BDY_[extract(get(%q0/MESS_LST),%q5,1)])]%r[repeat(=,78)]; &bb_read %#=[setunion(get(%#/bb_read),[extract(get(%q0/MESS_LST),%q5,1)])]}}; @wait 2={&bb_read %#=[setinter(get(%#/bb_read),get([v(bbpocket)]/master_lst))]}}}}

Page tags: code
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License