MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Means of gathering data



Irina Sadomova wrote:
> 
> I am quite new to admin side of MOOing.  I have recently set up a MOO. I
> am running LambdaMOO 1.8.0p5 and JHCore.db as of April, 1995.  My problem
> is that I  want to record what goes on in rooms. I don't know how to
> accomplish this.
> 
> Thanx.
> 
> Irina Sadomova


Here is a dump of the Generic Tape Recorder I wrote for logging interviews
on my MOO:

@prop #1875.("eject_msg") "%N %<pushes> eject on %t.  A microcasette flies out of it, transforming into a 
MOOmail message and promptly vanishes in a Star Trek transporter effect."
@prop #1875.("erase_msg") "%N %<ejects> the tape from %t, %<eats> it, and inserts a new one."
@prop #1875.("log") {}
@prop #1875.("on") 0
@prop #1875.("start_msg") "%N %<pushes> record on %t."
@prop #1875.("stop_msg") "%N %<pushes> stop on %t"



@args #1875:"tell" this none this
@chmod #1875:tell rx
@program #1875:tell
if (this.on)
  this.
log = {@this.log, $string_utils:from_list(args)};
endif
.

@args #1875:"start" this none none
@chmod #1875:start rx
@program #1875:start
if (player.wizard)
  if (this.on)
    player:tell_with_subs("%T %<is> already recording.");
  else
    this.on = 1;
    $you:say_action(this.start_msg);
  endif
else
  return E_PERM;
endif
.

@args #1875:"stop" this none none
@chmod #1875:stop rx
@program #1875:stop
if (player.wizard)
 if (this.on)
    $you:say_action(this.stop_msg);
    this.on = 0;
  else
   player:tell("It's already stopped already.  ;)");
  endif
else
  return E_PERM;
endif
.

@args #1875:"erase" this none none
@chmod #1875:erase rx
@program #1875:erase
if (player.wizard)
  if (this.on)
    this:stop();
  endif
  $you:say_Action(this.erase_msg);
  this.log = {};
else
  return E_PERM;
endif
.

@args #1875:"eject" this none none
@chmod #1875:eject rx
@program #1875:eject
if (player.wizard)
  $you:say_action(this.eject_msg);
  $mail_agent:send_message(this, player, "A Log", this.log);
else
  return E_PERM;
endif
.


NOTES:

player:tell_with_subs ({args-for-:tell}[, who[, thing[, where)

this verb is a combination of :tell and $string_utils:pronoun_sub,
and doesn't exist in LambdaCore or JHCore.

Basically this is an object.  You drop it in a room, type

start recorder

and it records whatever happens in the room.

'stop recorder' stops the log.  'eject recorder' MOOmails the log to
the person calling the verb, and 'erase recorder' resets the log.

You'll want to check :tell_lines on whatever you use as the parent of
this object to make sure it calls :tell one line at a time.  If not,
then you'll need to add a "tell_lines" to the object.


Follow-Ups: References:

Home | Subject Index | Thread Index