: control? ( d -- i ) me @ wizard? over owner me @ dbcmp or over "J" flag? or over dup "O" flag? swap player? not and or over "L" flag? or over "V" flag? or ; : say ( s -- ) me @ swap notify ; : unparse_contents ( d -- ) dup contents 0 swap begin dup while dup control? me @ "S" flag? not and if dup name "(#" strcat over intostr strcat over flagstr strcat me @ "A" flag? if " " strcat over owner name strcat then ")" strcat else dup name then swap pop -4 rotate swap 1 + swap next loop pop dup not if pop "## " swap name strcat " has no contents." strcat say exit then swap name "## " swap strcat " contains: " strcat swap 1 swap 1 for pop swap strcat ", " strcat loop dup strlen 2 - strcut pop dup ", " rinstr dup not if pop else 1 + strcut "and " swap strcat strcat then say ; : main ( s -- ) dup not if pop "here" then dup dup "#" 1 strncmp not swap number? and if 1 strcut swap pop atoi dbref dup location loc @ dbcmp not over owner me @ dbcmp and over control? or not if pop "@> I don't see that here." say exit else unparse_contents exit then else match dup not if pop "@> I don't see that here." say exit then dup #-2 dbcmp if pop "@> I don't know which you mean." say exit then dup #-3 dbcmp if pop "@> HOME is invalid." say exit then unparse_contents then ;