MOO-cows Mailing List Archive


Re: MCP experience story

On Fri, 13 Oct 1995, Andreas Dieberger wrote:


> As I see it so far there was a sort of specification that stems from the
> Jupiter and AstroVR systems. Then there is a rewrite that looks a little
> bit different. What came out of the MOO again looked a bit different. Well

Yes, basically, this is the size of it.

> First I should admit that TechMOO does no dot-quoting right now. That is a
> request is sent like this:
> #$#edit* 123456 type: text name: "test.text" upload: "@set-note-text #388.text"
> blablabla
> blablabla
> .
> Thats one of my next things to work on I think... Any hints how to best do
> that are very welcome (I probably have to use a modified
> $command_utils:read_lines huh?)

Well, you could always parse the dot-quoting after you finished receiving.

Here's some simple code to do dot quoting:

  for i in [1..length(lines)]
    if (lines[i][1] == ".")
      lines[i][1..0] = ".";

And to undo:

  for i in [1..length(lines)]
    if (lines[i][1] == ".")
      lines[i][1..1] = "";

Just put this into appropriate dot-quote/unquote verbs or dot-quoting/ 
unquoting tell/read verbs.

Of course, you might also want to create a new $command_utils:read 
equivalent so you can replace @abort with .abort or something, otherwise 
your clients will have to dot-quote @abort and I doubt this is required 
by the spec.

> Anyway - here are my notes:
> MCP changes in TechMOO:
> In $generic_editor there was a deviation from the mcp specs.
> The editor put out a line like this
> #$# edit name: test.text upload: @set-note-text #388.text

This is a Lambdacore-style edit request. It's a separate protocol from 
mcp, but looks quite similar.

It might be good to support both, changing back and forth for individual 
users with an option.  In fact I'm going to recommend (if not implement) 
this change on JHM and hence in the next JHCore.


> $player:notify contains a strange if-construct:
> if (line[1..3] == "#$#")
>   line = " " + line;
> endif
> This additional blank was very disturbing so I threw that stuff out. I dont
> think that violates the mcp-spec. Actually the #$# should be at the
> beginning of the line I think. Perhaps the only reason for that was to make
> it a little harder for wizzes to send fake mcp commands to a colleague?

Well, the reason is so that people couldn't do things like use @paste to 
spawn an edit session on everybody's client and annoy people, so people 
couldn't embed mcp commands in moomail, page-echo messages, etc etc.  I'd 
put it back in if I were you.

> I had a hard time to find out where the
>   #$#mcp version: 1.0
> is generated. If you put it in the wrong places you get either errors, or
> nothing.

I think it would be best to use a notify() or the such in #0:user_connected.

> One last thing was to do (so far). When my client logs in it does a
>   @edit-option +local
> in reply to the #$#mcp version: 1.0
> So far so good. Only when I log in next using a line-based client, the
> +local is still valid. Therefore this should be reset automatically, I
> thought. Here is what I did:
> In #6:maybe_really_disconnected there is a fork statement that transfers a
> player home after a certain amount of time. There I put in a line that
> resets the edit-option:

This is actually a fairly good idea if the client you use automatically 
sets the option.  A more realistic option for moos with other clients 
would be to leave the edit-option as it is and have some per-session 
override that could be done by the client.  I think I'll look into more 
flexible edit-options on JHM.

> I hope somebody finds that useful - if not, sorry for wasting bandwidth

Well, at the least it might have spurred some progress.  :)

James "+local" Deikun
the fender of justice * writer of wrongs * sitter upon the holy flagpole
********************* "Bones! can he! be! cured?!" *********************
*********** "Dammit, Jim, I'm a doctor, not a-- oh.  Right." ***********

Follow-Ups: References:

Home | Subject Index | Thread Index