Re: Editors

From: Patrick Dughi (dughi@imaxx.net)
Date: 09/04/02


> Anyone tried to have circle use an external editor such as vi or pico to do
> text editting for OLC, etc?  I remembed seeing this in a circle derivative,
> but can't remember which one.  If someone has attempted this and got it
> working let me know, I have some questions I would like to ask you :).
>
        Actually, the non-maintained mud++ code provided this via a
chopped down version of pico called 'spico' (for 'secure' pico).  I
believe it more-or-less worked.

        The concept is pretty simple actually, at least, for unix systems.
Simply open a pipe (the dup family works pretty well for this), and
reconnect the output.

        The problem is really just one then of correctly buffering,
translating, and passing information between well... everything.  It's non
trivial.

        The method that mud++ tries to use (and you can decide for
yourself if it's the best or not) is to open up a pseudoterminal, link it
with a tty via dup or dup2, and then place all faith in what they call a
mini-terminal.  I looked at it with high expectations, originally, but
since they claim to be porting code directly over from the BSD telnetd
daemon, it's obviously a tainted source(*).  The concept is sound though,
just write up a partially working telnet daemon.

        Of course, if the mud had full telnet support from the getgo, this
step wouldn't really be necessary.

        All of the above is performed in it's own fork, of course, so
select and other blocking-polling methods could be used. Upon termination,
the file descriptors for input/output/etc can be reconnected with the
in-game file descriptor object.  If you wanted it to work in windows, it
wouldn't be a big thing to just integrate it into a specially-handled
desscriptor loop with the rest of the input/output, though it is a bit
more complicated than just temporarily closing them.

        Really though, rather simple.  I got something that was relatively
capable of working (cept for some nonsense with arrow keys, but I think
that was due to terminal issues), as long as you disregarded the fact that
the mud would crash if you exited the spawned program (but not if you lost
link and reconnected).

        So, that's of dubious value ;)

                                                PjD

* - Tainted in this case because MUD++ is supposedly GPL'ed, but I believe
the code for the BSD telnetd and rlogin programs which is referenced by
MUD++ is licensed under the original BSD license, and not the modified BSD
license which does not require an advertising clause ("This product
includes software developed by the University of  California, Berkeley and
its contributors.", etc,etc).

        I could be wrong, but why take the chance when this method is
spelled out in actual gpl'ed software everywhere anyway.

        If you want to get anal about it, he (Melvin Smith) also imposes
additional diku-mud like restrictions such as waiving right to profit from
the mud, requiring free access to the service, etc, all of which are in
conflict with not only the spirit but also the legal jargon of the GPL
license.

        The practical upshoot of all this; if you use this code to make a
useful module for CircleMUD, you cannot give it to anyone else, or you'll
violate licences.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT