Skip to content

Commit

Permalink
2.0 Beta
Browse files Browse the repository at this point in the history
- Refactored GETPROPERTY's GROUP information retrieval and added new
systems for +finger's +gameconfig options.
- Implemented simplistic caching for some aspects of GETPROPERTY's group
retrieval.
  • Loading branch information
volundmush committed Sep 4, 2015
1 parent 12bd652 commit ef1b22e
Show file tree
Hide file tree
Showing 9 changed files with 235 additions and 181 deletions.
6 changes: 2 additions & 4 deletions Account Management System - AMS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ th u(NEWCOBJ,Ban Database <BANDB>,bandb,u(cobj,ams),,1,WIZARD SAFE,SIDEFX SAFE)

&INC`ACCOUNT`ACTIVE [u(cobj,ams)]=th u(setq,listing,sortkey(#lambda/lmath(min,iter(get(u(adb)/\%0),if(isobjid(\%i0),if(lte(sub(secs(),convtime(get(\%i0/LAST))),mul(60,60,24,30)),csecs(\%i0))))),filterbool(#lambda/lmath(max,iter(get(u(adb)/\%0),if(isobjid(\%i0),if(lte(sub(secs(),convtime(get(\%i0/LAST))),mul(60,60,24,30)),1)))),u(lattr,u(adb)/*)),n));@attach %!/INC`ACCOUNT`LIST

&FUN`ACCOUNT`CHARLINE [u(cobj,ams)]=align(-6 3 -2 -2 -4 22 -4 21 6,num(%0),switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEM,WIZTAG),WIZ),hasflag(%0,ROYALTY),ansi(u(game_config,SYSTEM,ROYTAG),ROY),u(isadmin,%0),ansi(hy,ADM),haspower(%0,BUILDER),ansi(hm,BUI),u(isapproved,%0),ansi(hg,APP),ansi(hr,---)),default(%0/D`ALTS,0),default(%0/D`ALTS`PRIORITY,0),default(%0/D`FINGER`TYPE,??),u(pueblize,u(moniker,%0),+finger [name(%0)]),elements(maildstats(%0),5),u(pueblize,get(%0/LASTIP),+ip [name(%0)]),u(lastidle,%0))
&FUN`ACCOUNT`CHARLINE [u(cobj,ams)]=align(-6 3 -2 -3 -4 21 -4 21 6,num(%0),switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEM,WIZTAG),WIZ),hasflag(%0,ROYALTY),ansi(u(game_config,SYSTEM,ROYTAG),ROY),u(isadmin,%0),ansi(hy,ADM),haspower(%0,BUILDER),ansi(hm,BUI),u(isapproved,%0),ansi(hg,APP),ansi(hr,---)),default(%0/D`ALTS,0),u(getproperty,%0,MAJORABBR),default(%0/D`FINGER`TYPE,??),u(pueblize,u(moniker,%0),+finger [name(%0)]),elements(maildstats(%0),5),u(pueblize,get(%0/LASTIP),+ip [name(%0)]),u(lastidle,%0))



&INC`ACCOUNT`SHOW [u(cobj,ams)]=th u(setq,pcs,u(filter,ISOBJID,get(%q<accid>/CHARACTERS)));@pemit %#=u(HEADER,name(%q<accid>)[if(strlen(u(setr,email,get(%q<accid>/EMAIL))),:%B%q<email>)]);@pemit %#=align(-6 3 2 2 4 22 4 21 6,Dbref,Sta,Al,Pr,Type,Name,Mail,IP,LastOn);@pemit %#=u(SEPARATOR);@dolist/inline %q<pcs>={@pemit %#=u(FUN`ACCOUNT`CHARLINE,##)};@select/inline cand(u(isadmin,%#),gt(words(u(setr,old,u(filter,OLDOBJID,get(%q<accid>/OLD),|,|)),|),0))=1,{@pemit %#=u(SEPARATOR,Old Characters);@pemit %#=align(-6 3 3 21 8 21,Dbref,,,Name,,Objid);@dolist/inline/delimit | [u(SORTOLDID,%q<old>,|,|)]={@pemit %#=align(-6 3 -3 21 8 21,before(##,:),,,after(##,~),,before(##,~))}};@pemit %#=u(HEADER)
&INC`ACCOUNT`SHOW [u(cobj,ams)]=th u(setq,pcs,u(filter,ISOBJID,get(%q<accid>/CHARACTERS)));@pemit %#=u(HEADER,name(%q<accid>)[if(strlen(u(setr,email,get(%q<accid>/EMAIL))),:%B%q<email>)]);@pemit %#=align(-6 3 2 3 4 21 4 21 6,Dbref,Sta,Al,Fac,Type,Name,Mail,IP,LastOn);@pemit %#=u(SEPARATOR);@dolist/inline %q<pcs>={@pemit %#=u(FUN`ACCOUNT`CHARLINE,##)};@select/inline cand(u(isadmin,%#),gt(words(u(setr,old,u(filter,OLDOBJID,get(%q<accid>/OLD),|,|)),|),0))=1,{@pemit %#=u(SEPARATOR,Old Characters);@pemit %#=align(-6 3 3 21 8 21,Dbref,,,Name,,Objid);@dolist/inline/delimit | [u(SORTOLDID,%q<old>,|,|)]={@pemit %#=align(-6 3 -3 21 8 21,before(##,:),,,after(##,~),,before(##,~))}};@pemit %#=u(HEADER)

&INC`ACCOUNT`MAKENEW [u(cobj,ams)]=th u(setq,nextid,add(1,u(lmax,iter(children(u(cobj,accounts)),last(name(%i0))))));@attach %!/INC`ACCOUNT`MAKENUM=%q<nextid>
&INC`ACCOUNT`MAKENUM [u(cobj,ams)]=@tel [u(setr,accid,create(Account [abs(%0)]))]=[u(cobj,accounts)];@parent %q<accid>=[u(cobj,accounts)]
Expand Down
73 changes: 59 additions & 14 deletions CORE 01 - Master Code Object - MCO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,25 +362,70 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
&GETPROPERTY`ACCEMAIL [u(cobj,mco)]=if(isdbref(u(accid,%0)),get(u(accid,%0)/EMAIL))
&GETPROPERTY`ACCALTS [u(cobj,mco)]=if(isdbref(u(cobj,ams)),u(u(cobj,ams)/FUN`ALTS`LIST,%0))

&GETPROPERTY`GROUPS [u(cobj,mco)]=u(sortgroups,u(sortname,setinter(get(%0/D`GROUPS),u(u(cobj,gms)/FUN`LISTGROUPS))))
&GETPROPERTY`GTITLE [u(cobj,mco)]=get(%0/D`GROUP`[u(namegrab,u(GETPROPERTY`GROUPS,%0,%1,%2),%1)]`TITLE)
&GETPROPERTY`FACTIONDB [u(cobj,mco)]=first(u(GETPROPERTY`FACTIONSDB,%0,%1,%2,%3))
&GETPROPERTY`FACTIONCOLOR [u(cobj,mco)]=if(isdbref(u(setr,fac,u(GETPROPERTY`FACTIONDB,%0,%1,%2,%3))),u(u(cobj,gms)/FUN`GETSET,%q<fac>,COLOR),hx)
&GETPROPERTY`FACTIONSDB [u(cobj,mco)]=u(filter,FACTIONS,u(GETPROPERTY`GROUPS,%0,%1,%2,%3))
&GETPROPERTY`FACTION [u(cobj,mco)]=if(isdbref(u(setr,fac,u(GETPROPERTY`FACTIONDB,%0,%1,%2,%3))),u(GETPROPERTY`GROUPNAMES,%0,%1,%q<fac>,%3))
&GETPROPERTY`FACABBR [u(cobj,mco)]=switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEm,WIZTAG),WIZ),u(isadmin,%0),ansi(u(game_config,SYSTEm,ROYTAG),ROY),if(isdbref(u(setr,fac,u(GETPROPERTY`FACTIONDB,%0,%1,%2,%3))),ansi(u(strfirstof,u(color,%#,GROUP,%q<fac>,,1),get(%q<fac>/SET`COLOR),n),get(%q<fac>/SET`ABBREVIATION))))
&GETPROPERTY`FACABBRS [u(cobj,mco)]=switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEm,WIZTAG),WIZ),u(isadmin,%0),ansi(u(game_config,SYSTEm,ROYTAG),ROY),if(words(u(setr,facs,u(GETPROPERTY`FACTIONSDB,%0,%1,%2,%3))),iter(%q<facs>,ansi(u(strfirstof,u(color,%#,GROUP,%i0,,1),get(%i0/SET`COLOR),n),get(%i0/SET`ABBREVIATION)),%b,|)))
&GETPROPERTY`FACLETTER [u(cobj,mco)]=switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEm,WIZTAG),WIZ),u(isadmin,%0),ansi(u(game_config,SYSTEm,ROYTAG),ROY),if(isdbref(u(setr,fac,u(GETPROPERTY`FACTIONDB,%0,%1,%2,%3))),ansi(u(strfirstof,u(color,%#,GROUP,%q<fac>,,1),get(%q<fac>/SET`COLOR),n),u(strfirstof,get(%q<fac>/SET`LETTER),left(get(%q<fac>/SET`ABBREVIATION),1)))))
&GETPROPERTY`FACTIONS [u(cobj,mco)]=if(words(u(setr,fac,u(GETPROPERTY`FACTIONSDB,%0,%1,%2,%3))),u(GETPROPERTY`GROUPNAMES,%0,%1,%q<fac>,%3))
&GETPROPERTY`RANK [u(cobj,mco)]=if(isdbref(u(setr,fac,u(GETPROPERTY`FACTIONDB,%0,%1,%2,%3))),u(GETPROPERTY`RANKS,%0,%1,%q<fac>,%3))
&GETPROPERTY`RANKS [u(cobj,mco)]=edit(iter(u(strfirstof,%2,u(GETPROPERTY`FACTIONSDB,%0,%1,%2,%3)),u(setr,rank,get(%0/D`GROUP`%i0`RANK))-[u(strfirstof,get(%0/D`GROUP`%i0`TITLE),get(%i0/RANK`%q<rank>`NAME))],%b,|),|,if(%3,%r,\,%b))
&GETPROPERTY`GROUPNAMES [u(cobj,mco)]=edit(iter(u(strfirstof,%2,u(sortname,setdiff(u(GETPROPERTY`GROUPS,%0,%1,%2,%3),u(GETPROPERTY`FACTIONSDB,%0,%1,%2,%3)))),if(%1,u(pueblize,ansi(u(strfirstof,get(%i0/SET`COLOR),n),name(%i0)),+group [name(%i0)]),ansi(u(strfirstof,get(%i0/SET`COLOR),n),name(%i0))),%b,|),|,if(%3,%r,\,%b))
&GETPROPERTY`GROUPS [u(cobj,mco)]=localize(default(%0/D`CACHE`GROUPS,u(setr,cache,u(sortgroups,u(sortname,setinter(get(%0/D`GROUPS),u(u(cobj,gms)/FUN`LISTGROUPS)))))[u(attrib_set,%0,D`CACHE`GROUPS,%q<cache>)]))

&GETPROPERTY`MAJORDBS [u(cobj,mco)]=localize(default(%0/D`CACHE`MAJORDBS,u(setr,cache,u(sortgroups,u(sortname,u(filter,MAJOR,u(GETPROPERTY`GROUPS,%0)))))[u(attrib_set,%0,D`CACHE`MAJORDBS,%q<cache>)]))
&GETPROPERTY`MAJORDB [u(cobj,mco)]=first(u(GETPROPERTY`MAJORDBS,%0))
&GETPROPERTY`MINORDBS [u(cobj,mco)]=localize(default(%0/D`CACHE`MINORDBS,u(setr,cache,u(sortgroups,u(sortname,u(filter,MINOR,u(GETPROPERTY`GROUPS,%0)))))[u(attrib_set,%0,D`CACHE`MINORDBS,%q<cache>)]))
&GETPROPERTY`MINORDB [u(cobj,mco)]=first(u(GETPROPERTY`MINORDBS,%0))
&GETPROPERTY`FIRSTDB [u(cobj,mco)]=u(strfirstof,u(GETPROPERTY`MAJORDB,%0),u(GETPROPERTY`MINORDB,%0))

&GETPROPERTY`GROUPNAME [u(cobj,mco)]=localize(u(setq,gname,ansi(u(GETPROPERTY`GROUPCOLOR,%0),u(moniker,%0)))[if(%1,u(pueblize,%q<gname>,+group [name(%0)]),%q<gname>)])
&GETPROPERTY`GROUPCOLOR [u(cobj,mco)]=u(strfirstof,u(color,%#,GROUP,%0,,1),get(%0/SET`COLOR),n)
&GETPROPERTY`GROUPABBR [u(cobj,mco)]=ansi(u(GETPROPERTY`GROUPCOLOR,%0),default(%0/SET`ABBREVIATION,left(name(%0),3)))
&GETPROPERTY`GROUPLETTER [u(cobj,mco)]=ansi(u(GETPROPERTY`GROUPCOLOR,%0),default(%0/SET`LETTER,u(strfirstof,left(get(%0/SET`ABBREVIATION),1),left(name(%0),1))))

&GETPROPERTY`RANK [u(cobj,mco)]=localize(u(setr,rank,get(%0/D`GROUP`%1`RANK))-[u(strfirstof,get(%0/D`GROUP`%1`TITLE),get(%1/RANK`%q<rank>`NAME))])

&GETPROPERTY`MAJORNAME [u(cobj,mco)]=localize(if(isdbref(u(setr,fac,u(GETPROPERTY`MAJORDB,%0))),u(GETPROPERTY`GROUPNAME,%q<fac>,%1)))
&GETPROPERTY`MAJORNAMECLICK [u(cobj,mco)]=u(GETPROPERTY`MAJORNAME,%0,1)
&GETPROPERTY`MAJORABBR [u(cobj,mco)]=localize(switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEM,WIZTAG),WIZ),u(isadmin,%0),ansi(u(game_config,SYSTEM,ROYTAG),ROY),if(isdbref(u(setr,fac,u(GETPROPERTY`MAJORDB,%0))),u(GETPROPERTY`GROUPABBR,%q<fac>))))
&GETPROPERTY`MAJORLETTER [u(cobj,mco)]=localize(switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEm,WIZTAG),W),u(isadmin,%0),ansi(u(game_config,SYSTEM,ROYTAG),R),if(isdbref(u(setr,fac,u(GETPROPERTY`MAJORDB,%0))),u(GETPROPERTY`GROUPLETTER,%q<fac>))))
&GETPROPERTY`MAJORRANK [u(cobj,mco)]=localize(if(isdbref(u(setr,fac,u(GETPROPERTY`MAJORDB,%0))),u(GETPROPERTY`RANK,%0,%q<fac>)))
&GETPROPERTY`MAJORNAMELIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`MAJORDBS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`GROUPNAME,%i0,%1),%b,beep()),beep(),if(%2,%R,\,%b))))
&GETPROPERTY`MAJORNAMELISTLINE [u(cobj,mco)]=u(GETPROPERTY`MAJORNAMELIST,%0,0,1)
&GETPROPERTY`MAJORNAMELISTCLICK [u(cobj,mco)]=u(GETPROPERTY`MAJORNAMELIST,%0,1,0)
&GETPROPERTY`MAJORNAMELISTLINECLICK [u(cobj,mco)]=u(GETPROPERTY`MAJORNAMELIST,%0,1,1)
&GETPROPERTY`MAJORRANKLIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`MAJORDBS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`RANK,%0,%i0),%b,beep()),beep(),if(%1,%R,\,%b))))
&GETPROPERTY`MAJORRANKLISTLINE [u(cobj,mco)]=u(GETPROPERTY`MAJORRANKLIST,%0,1)

&GETPROPERTY`MINORNAME [u(cobj,mco)]=localize(if(isdbref(u(setr,fac,u(GETPROPERTY`MINORDB,%0))),u(GETPROPERTY`GROUPNAME,%q<fac>,%1)))
&GETPROPERTY`MINORNAMECLICK [u(cobj,mco)]=u(GETPROPERTY`MINORNAME,%0,1)
&GETPROPERTY`MINORABBR [u(cobj,mco)]=localize(switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEM,WIZTAG),WIZ),u(isadmin,%0),ansi(u(game_config,SYSTEM,ROYTAG),ROY),if(isdbref(u(setr,fac,u(GETPROPERTY`MINORDB,%0))),u(GETPROPERTY`GROUPABBR,%q<fac>))))
&GETPROPERTY`MINORLETTER [u(cobj,mco)]=localize(switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEm,WIZTAG),W),u(isadmin,%0),ansi(u(game_config,SYSTEM,ROYTAG),R),if(isdbref(u(setr,fac,u(GETPROPERTY`MINORDB,%0))),u(GETPROPERTY`GROUPLETTER,%q<fac>))))
&GETPROPERTY`MINORRANK [u(cobj,mco)]=localize(if(isdbref(u(setr,fac,u(GETPROPERTY`MINORDB,%0))),u(GETPROPERTY`RANK,%0,%q<fac>)))
&GETPROPERTY`MINORNAMELIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`MINORDBS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`GROUPNAME,%i0,%1),%b,beep()),beep(),if(%2,%R,\,%b))))
&GETPROPERTY`MINORNAMELISTLINE [u(cobj,mco)]=u(GETPROPERTY`MINORNAMELIST,%0,0,1)
&GETPROPERTY`MINORNAMELISTCLICK [u(cobj,mco)]=u(GETPROPERTY`MINORNAMELIST,%0,1,0)
&GETPROPERTY`MINORNAMELISTLINECLICK [u(cobj,mco)]=u(GETPROPERTY`MINORNAMELIST,%0,1,1)
&GETPROPERTY`MINORRANKLIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`MINORDBS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`RANK,%0,%i0),%b,beep()),beep(),if(%1,%R,\,%b))))
&GETPROPERTY`MINORRANKLISTLINE [u(cobj,mco)]=u(GETPROPERTY`MINORRANKLIST,%0,1)

&GETPROPERTY`FIRSTNAME [u(cobj,mco)]=localize(if(isdbref(u(setr,fac,u(GETPROPERTY`FIRSTDB,%0))),u(GETPROPERTY`GROUPNAME,%q<fac>,%1)))
&GETPROPERTY`FIRSTNAMECLICK [u(cobj,mco)]=u(GETPROPERTY`FIRSTNAME,%0,1)
&GETPROPERTY`FIRSTABBR [u(cobj,mco)]=localize(switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEM,WIZTAG),WIZ),u(isadmin,%0),ansi(u(game_config,SYSTEM,ROYTAG),ROY),if(isdbref(u(setr,fac,u(GETPROPERTY`FIRSTDB,%0))),u(GETPROPERTY`GROUPABBR,%q<fac>))))
&GETPROPERTY`FIRSTLETTER [u(cobj,mco)]=localize(switch(1,u(iswizard,%0),ansi(u(game_config,SYSTEm,WIZTAG),W),u(isadmin,%0),ansi(u(game_config,SYSTEM,ROYTAG),R),if(isdbref(u(setr,fac,u(GETPROPERTY`FIRSTDB,%0))),u(GETPROPERTY`GROUPLETTER,%q<fac>))))
&GETPROPERTY`FIRSTRANK [u(cobj,mco)]=localize(if(isdbref(u(setr,fac,u(GETPROPERTY`FIRSTDB,%0))),u(GETPROPERTY`RANK,%0,%q<fac>)))
&GETPROPERTY`FIRSTNAMELIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`FIRSTDBS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`GROUPNAME,%i0,%1),%b,beep()),beep(),if(%2,%R,\,%b))))
&GETPROPERTY`FIRSTNAMELISTLINE [u(cobj,mco)]=u(GETPROPERTY`FIRSTNAMELIST,%0,0,1)
&GETPROPERTY`FIRSTNAMELISTCLICK [u(cobj,mco)]=u(GETPROPERTY`FIRSTNAMELIST,%0,1,0)
&GETPROPERTY`FIRSTNAMELISTLINECLICK [u(cobj,mco)]=u(GETPROPERTY`FIRSTNAMELIST,%0,1,1)
&GETPROPERTY`FIRSTRANKLIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`FIRSTDBS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`RANK,%0,%i0),%b,beep()),beep(),if(%1,%R,\,%b))))
&GETPROPERTY`FIRSTRANKLISTLINE [u(cobj,mco)]=u(GETPROPERTY`FIRSTRANKLIST,%0,1)

&GETPROPERTY`ALLNAMELIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`GROUPS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`GROUPNAME,%i0,%1),%b,beep()),beep(),if(%2,%R,\,%b))))
&GETPROPERTY`ALLNAMELISTLINE [u(cobj,mco)]=u(GETPROPERTY`ALLNAMELIST,%0,0,1)
&GETPROPERTY`ALLNAMELISTCLICK [u(cobj,mco)]=u(GETPROPERTY`ALLNAMELIST,%0,1,0)
&GETPROPERTY`ALLNAMELISTLINECLICK [u(cobj,mco)]=u(GETPROPERTY`ALLNAMELIST,%0,1,1)
&GETPROPERTY`ALLRANKLIST [u(cobj,mco)]=localize(if(words(u(setr,facs,u(GETPROPERTY`GROUPS,%0))),edit(iter(%q<facs>,u(GETPROPERTY`RANK,%0,%i0),%b,beep()),beep(),if(%1,%R,\,%b))))
&GETPROPERTY`ALLRANKLISTLINE [u(cobj,mco)]=u(GETPROPERTY`ALLRANKLIST,%0,1)

&SORTGROUPS [u(cobj,mco)]=u(SORTGROUPS`[v(game)],%0,if(strlen(%1),%1,%B),if(strlen(%2),%2,%B))
&SORTGROUPS`PENNMUSH [u(cobj,mco)]=sort(%0,attr:SET`SORT,%1,%2)
&SORTGROUPS`RHOSTMUSH [u(cobj,mco)]=sortby(#lambda/[lit([ncomp(default(%0/SET`SORT,99),default(%1/SET`SORT,99))])],%0,%1,%2)

&FIL`FACTIONS [u(cobj,mco)]=t(u(u(cobj,gms)/FUN`GETSET,%0,MAJOR))
&FIL`MAJOR [u(cobj,mco)]=t(u(u(cobj,gms)/FUN`GETSET,%0,MAJOR))
&FIL`MINOR [u(cobj,mco)]=not(u(u(cobj,gms)/FUN`GETSET,%0,MAJOR))

@@ cand(u(u(cobj,gms)/FUN`GETSET,%0,MAJOR),strmatch(FACTION,u(u(cobj,gms)/FUN`GETSET,%0,TYPE)))
&FIL`MAJORGROUPS [u(cobj,mco)]=u(u(cobj,gms)/FUN`GETSET,%0,MAJOR)
Expand Down
2 changes: 1 addition & 1 deletion CORE 03 - Game Configuration System - GCS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ th u(NEWCOBJ,Game Configuration Data Storage <CONFIG>,config,u(cobj,gcs),,1,WIZA

&FUN`SETTINGS [u(cobj,gcs)]=sort(get(u(cobj,config)/CATEGORIES`%0),|,|)

&INC`GET [u(cobj,gcs)]=@check strlen(%0)=@attach %!/INC`MSG={ERROR: Category field empty.};@attach %!/INC`PARTIAL=%0,u(FUN`CATEGORIES),|,category,category;@check strlen(%1)=@attach %!/INC`MSG={ERROR: Option field empty.};@attach %!/INC`PARTIAL=%1,u(FUN`SETTINGS,%q<category>),|,option,option;@pemit %#=u(game_config,%q<category>,%q<option>)
&INC`GET [u(cobj,gcs)]=@check strlen(%0)=@attach %!/INC`MSG={ERROR: Category field empty.};@attach %!/INC`PARTIAL=%0,u(FUN`CATEGORIES),|,category,category;@check strlen(%1)=@attach %!/INC`MSG={ERROR: Option field empty.};@attach %!/INC`PARTIAL=%1,u(FUN`SETTINGS,%q<category>),|,option,option;@pemit %#=u(decompose,u(game_config,%q<category>,%q<option>))

&INC`SET [u(cobj,gcs)]=@check u(iswizard,%#)=@attach %!/INC`MSG=ERROR: Permission denied. Only wizards can set options.;@check strlen(%0)=@attach %!/INC`MSG={ERROR: Category field empty.};@attach %!/INC`PARTIAL=%0,u(FUN`CATEGORIES),|,category,category;@check strlen(%1)=@attach %!/INC`MSG={ERROR: Option field empty.};@attach %!/INC`PARTIAL=%1,u(FUN`SETTINGS,%q<category>),|,option,option;@switch/inline strlen(%2)=0,{@attach %!/INC`MSG=Cleared/reset %q<category> %q<option>!;@attach %!/WIPE=u(cobj,config),CONFIG`%q<category>`%q<option>;@attach %!/INC`MSG`CHAN={Cleared/Reset %q<category> %q<option>}},{@attach %!/INC`VALID`[default(u(cobj,config)/TYPE`%q<category>`%q<option>,WORD)]=%2;th u(attrib_set,u(cobj,config),CONFIG`%q<category>`%q<option>,%q<value>);@attach %!/INC`MSG=u(setr,msg,Game Option %q<category> %q<option> Set to: %q<value>);@attach %!/INC`MSG`CHAN={%q<msg>}}

Expand Down
2 changes: 1 addition & 1 deletion FCList Management System - FCLIST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ th u(NEWCOBJ,FCList Database <FCLIST-DB>,fclist-db,u(cobj,fclist),,1,WIZARD SAFE

&INC`LISTALL [u(cobj,fclist)]=@pemit %#=u(HEADER,mudname()'s Themes);@pemit %#=u(table,iter(u(sortattr,lattr(u(cobj,fclist-db)/F`*)),pueblize(get(u(cobj,fclist-db)/%i0),%q<com> [get(u(cobj,fclist-db)/%i0)]),%b,|),26,u(width,%#),|);@pemit %#=u(SUBHEADER,%q<com> <group> for listing - %q<com>/info <group> for Info)

&INC`LIST [u(cobj,fclist)]=@attach %!/INC`FIND=%0;@pemit %#=u(HEADER,%q<gname> Roster);@pemit %#=ansi(u(color,%#,FCLIST,COLUMN_NAMES),align(23 21 10 9 9,Name,Faction,Last On,Type,Available));@pemit %#=[u(SEPARATOR)];@dolist/inline u(sortname,u(filter,ISOBJID,get(u(cobj,fclist-db)/%q<group>`LIST)))={@pemit %#=align(23 21 10 9 9,u(moniker,##),u(strfirstof,u(getproperty,##,FACTION),Unaffiliated),u(lastidle,##),default(##/D`FINGER`TYPE,FC),u(capnames,default(##/D`FINGER`STATUS,Open)))};@pemit %#=u(SUBHEADER)
&INC`LIST [u(cobj,fclist)]=@attach %!/INC`FIND=%0;@pemit %#=u(HEADER,%q<gname> Roster);@pemit %#=ansi(u(color,%#,FCLIST,COLUMN_NAMES),align(23 21 10 9 9,Name,Faction,Last On,Type,Available));@pemit %#=[u(SEPARATOR)];@dolist/inline u(sortname,u(filter,ISOBJID,get(u(cobj,fclist-db)/%q<group>`LIST)))={@pemit %#=align(23 21 10 9 9,u(moniker,##),u(strfirstof,u(getproperty,##,MAJORNAMECLICK),Unaffiliated),u(lastidle,##),default(##/D`FINGER`TYPE,FC),u(capnames,default(##/D`FINGER`STATUS,Open)))};@pemit %#=u(SUBHEADER)

&INC`INFO [u(cobj,fclist)]=@attach %!/INC`FIND=%0;@pemit %#=u(HEADER,Theme Info: %q<gname>);@pemit %#=get(u(cobj,fclist-db)/%q<group>`DESC);@pemit %#=u(SUBHEADER)

Expand Down
Loading

0 comments on commit ef1b22e

Please sign in to comment.