Re: prompt_hook

will guaraldi <[email protected]>
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
Here's why I'm asking: I just reimplemented the net module to use the
telnetlib (which is broken in regards to telnet options in previous
versions of Python [though I can't remember which ones--I think 2.2 but it
might have been 2.1--I keep meaning to look this up]) and in doing so
dumped all our prompt detection stuff.

I was originally thinking it'd be useful for things like mappers and
anything else that really needs to link user commands with mud responses.
Josh implemented his commandresponse module at a higher level and it seems
to work a lot better.  I was never able to get my commandresponse module
(which worked with the prompt detection) to work.

So, given that I couldn't use it for what I was hoping to use it for, I'm
thinking it slows things down (running a regexp on all incoming data...)
and it's probably not needed.  But I wanted to check to see if anyone was
using it, first.

The other things I dumped were the net_read_filter and the
net_write_filter.  I borrowed code from Leantin which implements MCCP in
like 20 lines directly in the network layer without those hooks (my hook
implementation was klugy at best).

I need to figure out how the telnetlib handles IAC SB ... SE negotiation
things so that I can enable TERMTYPE.  I also need to figure out how to
re-implement IAC GA and IAC EOR stuff (it might be implemented already--I
need to read through the telnetlib code).

One possibility is that I could check it (and the related changes) in now.
It works well enough that I've been using it since Sunday without any
issues.  Would anyone want me to check it in now?  Otherwise I'm going to
sit on it for a smidge.

/will


On Tue, 20 Apr 2004, Eugene wrote:

> On Mon, 19 Apr 2004 12:45:36 -0500 (CDT) will guaraldi
> <[email protected]> wrote:
> >
> >Does anyone use the prompt hook as it is currently implemented?
> >
> >Anyone who is using it, can you send me your specific usage scenario so
> >that I can factor that into a possible redesign of the network module.
>
> I've tried to use it for prompt-type line detecting in the cursesui
> module, but it is a bit inconvenient as it is now, so I've decided to
> rely upon a more simple criteria for this task - if the line does not
> ends with "\n", then it is a prompt, otherwise it is not a prompt.
>
> So, althoug it was me who asked about the hook, now I'm not against
> removing (or changing) it, if it is what you mean.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.