MOO-cows Mailing List Archive

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

[cunkel@us.itd.umich.edu: Re: Modifying player properties based entering any command]



------- Start of forwarded message -------
Return-Path: moo-cows-errors@parc.xerox.com
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-NS-Transport-ID: 0800207424C500FBB328
Date: Wed, 19 Mar 1997 23:07:00 PST
From: Christopher Unkel <cunkel@us.itd.umich.edu>
Subject: Re: Modifying player properties based entering any command
In-Reply-to: <1.5.4.32.19691231190000.00671788@mailbox.syr.edu>
To: Kipp the Kidd <mcmudge@mailbox.syr.edu>
cc: moo-cows.PARC@xerox.com
Sender: MOO-Cows-Errors@parc.xerox.com
Precedence: bulk

On Wed, 19 Mar 1997, Kipp the Kidd wrote:

> At 05:27 PM 3/19/97 PST, Scott Robinson wrote:
> >Ok, you will have to set your connection to "binary".
> >(set_connection_option(player,"binary",1);) and have your :do_command
> >understand the "binary" representations in-Server (encode_binary,
> >decode_binary) because your server will error up with a "binary"
> >connection. I'll send in example code in a bit. =)
> 
> I don't think Henry was looking for this... he said anything a player types,
> and players can't "type" binary.  The <CR> is really just enter, which makes
> $do_command()'s argstr to "".  Also, this eliminates any chances of using
> default parsing, if do_command wants to use it.  I can't imagine why you
> would want this done on the main login port.

Yes, putting an incoming connection into binary mode has unpleasant side
effects.

But if you want the server to respond to empty lines -- that is, just a
CR, it is necessary.  The server ignores "blank" lines, so $do_command
will *not* be called with an argstr of "" when a CR by itself is entered. 

Try it -- program $do_command with something like "notify(player,
"$do_command); return 0;" and try some blank lines, either just a CR or
some spaces and then a CR.  You won't get any output.


  --Chris                           cunkel@umich.edu
    ResComp Senior Network Support Technician (SNST)
    Home Page: http://www-personal.engin.umich.edu/~cunkel/
    This signature no verb.
------- End of forwarded message -------


Home | Subject Index | Thread Index