: say ( s -- ) me @ swap notify ; : visdbref? ( d d -- i ) over wizard? swap dup dup "L" flag? rot "J" flag? rot owner 5 rotate dbcmp or or or ; : isawake? ( d -- i ) dup awake? swap "U" flag? not and ; : main ( s -- ) .sstrip dup not if pop "Usage: page [=message]" say exit then dup "=" instr not if .pmatch+ dup not if pop "Page: Player not found." say exit then dup isawake? not if pop "Page: Player is asleep." say exit then dup "H" flag? if pop "Page: Player is havened." say exit then me @ name " invites you to " strcat loc @ dup name swap dup 5 pick swap visdbref? if .fmatch strcat else pop then strcat "." strcat swap dup rot notify "You send your summons to " swap name strcat "." strcat say else dup "=" instr 1 - strcut 1 strcut swap pop .sstrip swap .sstrip dup not if pop me @ "*lp" getpropstr atoi dbref name then .pmatch+ dup not if pop pop "Page: Player not found." say exit then me @ "*lp" 3 pick intostr 0 addprop dup isawake? not if pop pop "Page: Player is asleep." say exit then dup "H" flag? if pop pop "Page: Player is havened." say exit then dup me @ name " pages from " strcat loc @ name strcat ": \"" strcat 4 rotate strcat "\"" strcat notify "Your message has been sent to %p." swap name "%p" subst say then ;