proto-verse / anomalyjobs

Automatically exported from code.google.com/p/anomalyjobs
0 stars 0 forks source link

Rhost Issues #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Comparing a diff to the currect Jobs 5.1 I see the following issues:

1) Line 147 - the Rhost file has the flags COMMAND and SIDEFX set on a new
bucket. 

2) Line 180 - the Rhost file uses a ufunc for itemize instead of imteize().
This is accompanied by the addition of the following to the install file:
@swi first(version())=RhostMUSH,{&FN_ITEMIZE Job Database
<JD>=\[elist(%%0,and,%%1)\]},{&FN_ITEMIZE Job Database
<JD>=\[itemize(%%0,%%1)]}

3) Line 183 - the Rhost file has the following for +job/sumset. I have not
looked to see if this is a bug fix or game specific or what.
&CMD_JOB/SUMSET Job Global Object <JGO>=$+job/sumset */*=*:@switch
[setq(5,0)][setq(0,locate(%va,Job
%0,i))][and(u(%va/HAS_ACCESS,%#),u(%va/CONFIG_ACCESS,%#),u(%q0/ACCESS_%1,%#))][i
sdbref(%q0)][not(u(%va/IS_LOCKED,%q0))][hasattrp(%q0,ACCESS_%1)][u(%q0/PROCESS_%
1,%2,%q0,%#)]=0*,{@pemit
%#=Permission denied.},10*,{@pemit %#=There is no bucket by that name. See
'[ansi(h,+buckets)]' for a list of valid buckets.},110*,{@pemit %#='%1' is
not a valid parameter. Valid parameters for [name(%q0)] are
[u(%va/FN_PRETTY,map(%va/MAP_PARAMS,lattr(%q0/PROCESS_*)))].},1110*,{@pemit
%#=That job is locked. It cannot be modified until it is
unlocked.},11110*,{@pemit %#=[u(%q0/ERROR_%1%q2)]},{@trigger
%va/TRIG_BROADCAST=[parent(%q0)],[name(%q0)]'s [ucstr(%1)] parameter
updated by %n.;&%q3 %q0=%q1;@trigger %va/TRIG_ADD=%q0,[ucstr(%1)] parameter
updated to '%2',%#,SUM}

4) Line 193. Change @wait .1 to @wait 1. Should this be a end-of-install
@edit? 

5) Line 197. @wait .1 to @wait 1.

6) Line 202. @wait .1 to @wait 1.

7) Line 207. @wait .1 to @wait 1.

8) Line 260. Swapping of itemize() to fn_itemize.

9) Changed (orflags(%#,WZ) to u(%va/IS_ADMIN,%#). Rhost file also added 
@swi first(version())=RhostMUSH,{&IS_ADMIN Job Database
<JD>=\[gte(bittype(%%0),2)\]},{&IS_ADMIN Job Database <JD>=\[orflags(%%0,WZ)\]}

10) Line 289. Changed
&FN_BUCKETNAME Job Database
<JD>=[ifelse(isdbref(parent(%0)),name(parent(%0)),ifelse(hasflag(%0,GOING),GOING
,ERROR))]
to
&FN_BUCKETNAME Job Database
<JD>=[ifelse(hasflag(%0,GOING),GOING,ifelse(isdbref(parent(%0)),name(parent(%0))
,ERROR))]

11) Line 309. Changed itemize to FN_ITEMIZE.

12) Line 407. Changed itemize to FN_ITEMIZE. Also changed all instances of
@log to
@trigger %va/TRIG_LOG_WRITE=[u(%q1/LOGFILE)],

Added 
&TRIG_LOG_WRITE Job Database <JD>=@switch
[first(version())]=RhostMUSH,{@log/file %0=%1},{@log %0=%1}

13) Line 436. Changed itemize to FN_ITEMIZE.

15) Line 452. Changed itemize to FN_ITEMIZE.

16) Line 479. Changed to 
@swi first(version())=RhostMUSH,{&TRIG_MAIL Job Tracker=mail
%[remove(%%0,owner%(me%)%)%]=%%1//%%2},{@mail/quick
%[remove%(%%0,owner%(me%)%)%]/%%1=%%2}

17) Line 778. Changed itemize to FN_ITEMIZE. 2 instances.

18) Line 778. Changed itemize to FN_ITEMIZE. 2 instances.

19) Line 872. Changed 
&FN_WIZONLY Job Database <JD>=[hasflag(%0,WIZARD)]
to
&FN_WIZONLY Job Database <JD>=[u(%va/IS_WIZARD,%0)]

Added
@swi first(version())=RhostMUSH,{&IS_WIZARD Job Database
<JD>=\[gte(bittype(%%0),5)\]},{&IS_WIZARD Job Database
<JD>=\[hasflag(%%0,WIZARD)\]}

20) Line 873. Changed 
&FN_STAFFALL Job Database <JD>=[orflags(%0,WZ)]
to 
&FN_STAFFALL Job Database <JD>=[u(%va/IS_ADMIN,%0)]

21) Line 936. Changed to
@switch [first(version())]=TinyMUSH,{&BUFFER Job Database
<JD>=4000},RhostMUSH,{&BUFFER Job Database <JD>=3999},{&BUFFER Job Database
<JD>=8000}

22) Added installation directives to set !NO_COMMAND and SIDEFX on the JGO,
 JD and JPO, and NO_COMMAND and SIDEFX on the Job Tracker, 

23) Line 988. Changed @switch
[setq(0,search(object=bbpocket))][isdbref(%q0)]=0,{@pemit
%#=[ansi(hc,ANOMALY JOBS:)] Couldn't find Myrddin's BBS. Installation is
not complete.},{@pemit %#=[ansi(hc,ANOMALY JOBS:)] Setting up the
BBS..;+bbnewgroup Job Tracker;@wait 2={+bbnewgroup Staff Job Tracker};@wait
5={&POST_COMPLETE
[setq(1,extract(u(%q0/GROUPS),dec(words(u(%q0/GROUPS))),1))][setq(2,last(u(%q0/G
ROUPS)))]Job
Parent Object <JPO>=member(u(%q0/GROUPS),%q1);&POST_APPROVE Job Parent
Object <JPO>=member(u(%q0/GROUPS),%q2);&POST_DENY Job Parent Object
<JPO>=member(u(%q0/GROUPS),%q2);&POST_DELETE Job Parent Object
<JPO>=member(u(%q0/GROUPS),%q2);&CANREAD %q1=1;&CANWRITE
%q1=%[or%(switch%(num%(%%#),[num(Job
Tracker)],1,0%),orflags%(%%#,WZ%)%)%];&CANREAD
%q2=%[orflags(%%#,WZ)];&CANWRITE %q2=%[or%(switch%(num%(%%#),[num(Job
Tracker)],1,0%),orflags%(%%#,WZ%)%)%]}}

to 

@switch [setq(0,search(object=bbpocket))][isdbref(%q0)]=0,{@pemit
%#=[ansi(hc,ANOMALY JOBS:)] Couldn't find Myrddin's BBS. Installation is
not complete.},{@pemit %#=[ansi(hc,ANOMALY JOBS:)] Setting up the
BBS..;+bbnewgroup Job Tracker;@wait 2={+bbnewgroup Staff Job Tracker};@wait
5={&POST_COMPLETE
[setq(1,extract(u(%q0/GROUPS),dec(words(u(%q0/GROUPS))),1))][setq(2,last(u(%q0/G
ROUPS)))]Job
Parent Object <JPO>=member(u(%q0/GROUPS),%q1);&POST_APPROVE Job Parent
Object <JPO>=member(u(%q0/GROUPS),%q2);&POST_DENY Job Parent Object
<JPO>=member(u(%q0/GROUPS),%q2);&CANREAD %q1=1;&CANWRITE
%q1=%[or%(switch%(num%(%%#),[num(Job
Tracker)],1,0%),u%(%%va/IS_ADMIN,%%#%)%)%];&CANREAD
%q2=%[u(%%va/IS_ADMIN,%%#)];&CANWRITE %q2=%[or%(switch%(num%(%%#),[num(Job
Tracker)],1,0%),u%(%%va/IS_ADMIN,%%#%)%)%]}}

Original issue reported on code.google.com by grey...@gmail.com on 29 Oct 2007 at 4:13

GoogleCodeExporter commented 9 years ago
I'm confused; what's The Rhost File?

Original comment by apt.shan...@gmail.com on 29 Oct 2007 at 6:07

GoogleCodeExporter commented 9 years ago
Anyhoo, I looked at the changes:

1 - COMMAND is pointless, SIDEFX I would not set globally. If someone has some 
magic
on a bucket that uses sidefx functions, they can set it then. Unless our default
install does, it shouldn't; the only use of sidefx I'm -aware- of is the 
statistics
stuff, and that's on Job Database, not a bucket parent. Or do we use sidefx 
elsewhere?

2 - True, Rhost's itemize is elist; but Rhost distributes with its code, and 
nearly
every game uses it, a file called 'softfunctions', which are various global
@functions that serve compatibility purposes. Personally? I'd just note that 
its a
pre-req for Rhost.

3 - ???

4-7 - Although Rhost's timeslices are one second and not smaller, the code 
works fine
with .1 for me. It comes out instantly, but I don't know why that wait is there 
anyways.

9 - I modified FN_WIZONLY and FN_STAFFALL already. I don't see why adding 
IS_WIZARD
and IS_ADMIN as another layer of indirection is desirable; why @swi to set 
those to
one thing for Rhost and one for the others, then call them from
FN_WIZONLY/FN_STAFFALL when you can @swi the FN_WIZONLY? Why add another 
function
call for no reason?

10 - This is no longer necessary what with the new destruction protocol being
cross-platform consistent. This was part of my mod.

12 - This log change is likely necessary, I never set up logging. Shall test it 
out.

16 - I did this one already.

19-20 - See #9

21 - This is still necessary.

22 - SEtting NO_COMMAND is still necessary, they already set SIDEFX. I don't use
no_command by default so forgot :)

23 - This is still necessary; though I'd just call FN_WIZONLY/FN_STAFFALL

Original comment by apt.shan...@gmail.com on 29 Oct 2007 at 6:55

GoogleCodeExporter commented 9 years ago
The install file should note that "queue_compatible" should be set to "yes" in 
the
netrhost.conf or @admin param; that makes Rhost's @wait/@notify queues behave 
like
MUX/etc.

Original comment by apt.shan...@gmail.com on 29 Oct 2007 at 7:31

GoogleCodeExporter commented 9 years ago
%va/FN_PRETTY equates to itemize (it pre-dates the MUX function, I don't know 
why we 
migrated to using itemize).

Original comment by Fleety...@gmail.com on 31 Oct 2007 at 12:09

GoogleCodeExporter commented 9 years ago
Using itemize on MUX and elist on Penn is more efficient than the FN_PRETTY 
ufunc. We
should probably update itemize() and FN_PRETTY. The two choices are:

1) Use itemize() in the install file and then at the end do a @switch which 
checks
for Rhost, and if so does an @edit on the Jobs objects to convert itemize to 
elist.

2) Use FN_ITEMIZE in place of itemize() and FN_PRETTY. FN_ITEMIZE would be 
installed via:
@swi first(version())=RhostMUSH,{&FN_ITEMIZE Job Database 
<JD>=\[elist(%%0,and,%%
1)\]},{&FN_ITEMIZE Job Database <JD>=\[itemize(%%0,%%1)]}

Original comment by grey...@gmail.com on 31 Oct 2007 at 4:22

GoogleCodeExporter commented 9 years ago
Or, 3) note that the softfunctions compatibility library, distributed /with/ 
Rhost inside the same zip, by Rhost 
devs, is a pre-requisite. 

Original comment by apt.shan...@gmail.com on 31 Oct 2007 at 5:04

GoogleCodeExporter commented 9 years ago
I'm not sure I consider #3 a viable option, not when we can make Jobs work 
without
the softfunctions library.

Original comment by grey...@gmail.com on 31 Oct 2007 at 5:39

GoogleCodeExporter commented 9 years ago
SIDEFX: If I recall correctly create() is a sidefx function on Rhost. That 
means the
character doing the installing will need to be SIDEFX. Also the +bucket/create
command uses create(). All of the job creation stuff is passed to TRIG_CREATE. 

Original comment by grey...@gmail.com on 31 Oct 2007 at 5:43

GoogleCodeExporter commented 9 years ago
Re: SIDEFX, the necessary objects are already set SIDEFX.

Original comment by apt.shan...@gmail.com on 31 Oct 2007 at 5:49

GoogleCodeExporter commented 9 years ago
As in, the above file is saying "Set the BUCKET sidefx" which is totally 
unnecessary.
The JGO/JD are already SIDEFX, which is all that is necessary. 

Original comment by apt.shan...@gmail.com on 31 Oct 2007 at 5:51

GoogleCodeExporter commented 9 years ago
3) After looking at this, the change someone made for their Rhost game was kind 
of
silly. They just reorganized some of the errors, but in a way that produced more
confusing errors. As such CMD_JOB/SUMET will remain unchanged.

9) FN_STAFFALL and FN_WIZONLY are fine. The above wasn't noting what we should 
do,
but what this other had done. I converted one use of orflags() to FN_STAFFALL,
including three in the BB setup. Those are grabbing the JD dbref and storing 
that
rather than using %VA.

12) The @log instances have been converted to a @trigger on TRIG_LOG_WRITE.
TRIG_LOG_WRITE is installed with an @switch to make it work with Rhost.

21) Updated the buffer switch for Rhost.

23: I updated the BB setup. Does it look good now for Rhost with the use of 
FN_STAFFALL?

Comment 3: I've created a README.RHOST file.

Original comment by grey...@gmail.com on 31 Oct 2007 at 6:28

GoogleCodeExporter commented 9 years ago
It looks right. I'll test it on a vanilla Rhost to be sure.

Original comment by apt.shan...@gmail.com on 31 Oct 2007 at 6:37

GoogleCodeExporter commented 9 years ago
You can do some other foo magic:
@swi/f [version()]=*Rhost*,&TRIG_MAIL Job Tracker=mail
%[remove%(%%0,owner%(me%)%)%]=%%1//%%2,*Penn*,&TRIG_MAIL Job Tracker=@mail
%[remove%(%%0,owner%(
me%)%)%]=%%1/%%2,&TRIG_MAIL Job Tracker=@mail/quick 
%[remove%(%%0,owner%(me%)%)%]/%%1=%%2

That should handle the mailer issue.

Every occurance of haspower(x,y) should be changed to 
or(hasflag(x,y),haspower(x,y))
since guest is a flag in Rhost, not a power.

I'd also suggest on MUX (and Rhost) to use gte(bittype(x),4) instead of 
orflags(x,ZW)
and gte(bittype(x),5) instead of hasflag(x,wizard).  With the hayday of multiple
flags in Rhost, bittype() is a handy animal.

children() should be compatible with MUX shortly.

softfunctions is indeed included in every rhost distribution.
the itemize alias is: [elist(%0,%2,%1,%4,%3)]

I also suggest enabling in the netrhost.conf file:
hasattrp_compat 1
queue_compatible 1
lnum_compat 1

Original comment by mrsen...@gmail.com on 23 Apr 2009 at 8:13

GoogleCodeExporter commented 9 years ago
Issue 32 has been merged into this issue.

Original comment by widdis@gmail.com on 10 Dec 2009 at 9:06

GoogleCodeExporter commented 9 years ago
Pushing to 5.3.

Original comment by widdis@gmail.com on 11 Dec 2009 at 8:40

GoogleCodeExporter commented 9 years ago
Upon thorough review of this, this can be done in 5.2.  Previous devs already 
made
most of the changes; the only outstanding one is the FN_PRETTY and itemize() 
calls
that can all be replaced with FN_ITEMIZE as described.

Willing to do this for 5.2 but will be unable to thoroughly test on Rhost.

Original comment by widdis@gmail.com on 14 Dec 2009 at 9:15

GoogleCodeExporter commented 9 years ago
Implemented the last bit of this, calling itemize() first, elist() second, and
fn_pretty if both of those fail.  All other changes listed in this issue were 
already
implented by other devs.

Original comment by widdis@gmail.com on 14 Dec 2009 at 5:20