⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.html

📁 Unix下的MUD客户端程序
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<h3>Table of contents</h3> <UL><LI><a href="#chap0">Introduction</a><LI><a href="#chap1">Requirements</a><LI><a href="#chap2">Installation</a><LI><a href="#chap3">Running in Virtual Console Mode</a><LI><a href="#chap4">Running in TTY mode</a><LI><a href="#chap5">Setup</a><LI><a href="#chap6">Running</a><LI><a href="#chap7">Commands</a><LI><a href="#chap8">Keys</a><LI><a href="#chap9">Prompt</a><LI><a href="#chap10">Stat window</a><LI><a href="#chap11">Options</a><LI><a href="#chap12">Color values</a><LI><a href="#chap13">Aliases</a><LI><a href="#chap14">Additional variables that can be expanded</a><LI><a href="#chap15">Regular expression: triggers and substitutes</a><LI><a href="#chap16">#exec</a><LI><a href="#chap17">#window</a><LI><a href="#chap18">Macros</a><LI><a href="#chap19">Speedwalk</a><LI><a href="#chap20">Changing the 'Command Character'</a><LI><a href="#chap21">MUD Inheritance</a><LI><a href="#chap22">The Chat subsystem</a><LI><a href="#chap23">More commands</a><LI><a href="#chap24">License</a><LI><a href="#chap25">Thanks</a></UL><PRE></PRE><h3><a name="chap0">Introduction</a></h3><PRE>I wrote mcl because I needed a fast MUD client that had scroll back built in.I hacked together a scroll back support for tintin, using less, but thatmessed up when color codes were received and it was pretty slow to pipe thesaved data to less each time it was activated.Also, tintin had a problem when a line was not received in one packet: itwould always change to a new line so long outputs looked very weird.With embedded Perl and Python support, I am confident that mcl can doeverything tintin (and even most other clients) ever have done.</PRE><h3><a name="chap1">Requirements</a></h3><PRE>The fastest mode of operation is under a Virtual Console found under Linux.However, since version 0.51.00, mcl supports normal TTY output to anyVT100/ANSI comptaible console - for example an Xterm. For best results,use a black background and white foreground (e.g. xterm -bg black -fg white).Sine mcl does not depend on /dev/vcsa anymore, it means it can rununder any Unix OS.</PRE><h3><a name="chap2">Installation</a></h3><PRE>To compile, follow the steps in INSTALL. That is run:./configuremakemake installIf you want the Perl scripting support, you need glibc as well as a libperl -the latter should be in your standard Perl package.Perl and Python support are compiled as shared object plugins, thus theydo not take up any memory unless you explicitly load them. Still, you candisable them at configure time if you want (see the INSTALL file).</PRE><h3><a name="chap3">Running in Virtual Console Mode</a></h3><PRE>Move the 'mcl' binary to some location like /usr/local/bin. If you wantnon-root users to use it in Virtual Console mode (Linux only), execute forexample: chown root.tty mcl                  chmod 2755 mcl                     Or type 'make install'. NOTE: I've heard that later version of the 'login'program automaticall change permissions on /dev/vcsa so that it is no longernecessary for mcl to run as SETGID. Also, some versions of RedHat makethe devices writable by anyone.This will make mcl be run as group 'tty' when it runs. This assumes thatyour /dev/vcsa* files are owned by group tty though.Make sure that /dev/vcsa* exist. If you want to run as non-root, make surethey are owned by group tty and are writable by that group. If the files donot exist, you'll have to create them: mknod /dev/vcsa1 c 7 129 mknod /dev/vcsa2 c 7 130etc. The vcsa devices should be available from Linux 1.1.92 onward.If you are wondering, the vcsa devices allow direct access to the VirtualConsole Screens and Attributes (there is a set of vcs devices, which do thesame except they do not show attributes).You must also move the plugin files to either /usr/local/lib/mcl/plugins/or ~/.mcl/plugins/. Make install does that for you automatically too. Thecompiled plugin files are in the subdirectory o/plugins/.You probably also want to move the contents of the samples/ directorydistributed with mcl to ~/.mcl and consider which of the scripts in thecontrib/ subdirectory to autoload (i.e. move to the auto/ directory sothey are automatically loaded when mcl starts). If a file does not existin the ~/.mcl/ directory, mcl will try to load the script from/usr/local/lib/mcl or /usr/lib/mcl.</PRE><h3><a name="chap4">Running in TTY mode</a></h3><PRE>This is somewhat slower. It's bearable in local XTerm, but may not be overa telnet connection that is anything but a direct network connection.mcl uses the two-byte Escape [ control code. If you use mcl from a terminalthat understands the CSI control code (which is one byte), you can try modifyingScreen.cc to use the shorter code (look for CSI in the file).mcl tries to use a scrolling region whenever possible to scroll text. Sincethe TTY Screen is at a much lower level than windows that scroll, it is donevia heuristics.mcl uses terminfo to find keyboard combinations. There are some that arestill missing however, and I'm not sure they can be found using terminfo atall.Under xterm or under rxvt, mcl will modify the title bar of the xterm todisplay connection state. If your terminal understands that escapecode (CSI 2 ; <text> BEL) and mcl does not send it, you probably need to modifyCurses.cc and add that to the list of terms that are considered xterms.If you have problems using Alt and another key under xterm, add the followingto your ~/.XDefaults file: *XTerm*VT100.eightBitInput: falseFor rxvt:Rxvt*meta8: false</PRE><h3><a name="chap5">Setup</a></h3><PRE>You need to set up the MUDs you connect to in the file ~/.mcl/mclrc. This isbest illustrated with an example:MUD ar {  Host abandoned.org 4444  Commands Drylock;qwerty; ;}The first line defines a new MUD, "ar". It uses the C-like notation ofa block, started by { (which must be on the same line!) and ending on} (which must be on a line by itself).The configuration options inside that affect only that MUD.Host: supplies hostname and portnumber of the MUDCommands: Optional. Specifies what commands will be sent to the MUDonce a connection is established (you could put username/password in here).Aliases, actions and macros you specify inside the MUD record will be validfor that MUD only (and for any MUDs that inherit from this MUD) (seelater <a href="#chap21">"MUD Inheritance"</a> chapter).You can specify other information in the configuration file - see the<a href="#chap11">"Options"</a> chapter.You can override the default resource filename by setting the environmentvariable MCLRC to the absolute location (note that you cannot use ~ tospecify your home directory).In addition, the embedded script use the  file ~/.mcl/config.lang as aplace to store their configuration. (i.e. Perl writes to ~/.mcl/config.perl,Python to ~/.mcl/config.python etc.)</PRE><h3><a name="chap6">Running</a></h3><PRE>Then run mcl, with the name of the MUD to connect to as parameter.Connecting is asynchronous, so you can do other things in the client whilewaiting. There isn't much to do though, but I thought counting down lookednifty :)The top line is a status line. Messages from the client appear up there. Themessages disappear after 5 seconds.The bottom line is the input line. Most editing keywords you'd expect towork work: arrow keys to edit the command line, arrow up to enter commandline history recall window. See <a href="#chap8">"Keys"</a> for a comprehensive list.If the MUD you want to connect to is not one that is in the database, andyou do not wish it to be there, you can just specify hostname/port numberon the command like (eg. "mcl abandoned.org 4444").If you leave out the MUD name on the command line, you will be able tospecify it while in the client by using Alt-O or #open.After mcl starts up, it will load the "sys/init.pl" script file (see the file<a href="Embedded.html">doc/Embedded</a> about embedded language support). You don't want to modifythat file - modify localinit.pl instead which is called within sys/init.pl.</PRE><h3><a name="chap7">Commands</a></h3><PRE>There is a number of commands, that start with #, that are not send to theMUD but rather interpreted by mcl. You can change the # character into somethingelse like / by using the commandcharacter option in the configuration file.#open <mud name>        Connects to that MUD#reopen                 Connects to the last MUD you connected to#close                  Stops the current session#quit                   Stops the session and leaves the program#help                   Not very helpful#exec                   Execute a command in a window#echo                   Show something in the output window (do not send it)#window                 Create a window#print                  Print to a window created by #window#clear                  Clear above window#kill                   Kill a window created by #window#send                   Send data to MUD, without newline#bell                   Sound the bell#status                 Change the status line to the argument given#alias                  Remove an alias or add a new alias#macro                  Add/remove/change a macro#run                    Run the given embedded function (see the file <a href="Embedded.html">doc/Embedded</a>)#eval                   Evaluate any embedded code, print result on screen#load                   Load some embedded code from a file#prompt                 Set the prompt (useful when you don't have GA/EOR)#setinput               Set the input line#save                   Save the scrollback. Use the -c switch to save in color.#writeconfig            Save the configuration file, even if readonly option is set. If                        parameter given, use that as a filename rather than the default                        filename#disable                Disable/Enable one of: actions, aliases, speedwalk, #enable                 and macros. This enables/disables ALL of those, not a single one.#chat.*                 There is a number of commands that allow you to perform various                        tasks related to the built-in peer-to-peer chat system of mcl                        They are described in the file <a href="Chat.html">doc/Chat</a>.In addition, a line that starts with \ (which can be changed using the escapecharacter inthe configuration file) is sent as-is to the MUD.</PRE><h3><a name="chap8">Keys</a></h3><PRE>Alt-O                   See a menu of MUDs. Return connects, E edits the                        currently selected MUD's data. Alt-A shows the                        aliases of that MUD.Alt-C                   Same as #closeAlt-A                   Show currently active aliases. First the aliases for                        this particular MUD are shown, the global aliases.Alt-I                   Show currently active actions.Alt-M                   Show currently active keyboard macros.Alt-S                   Toggle network status windowControl-T               Show timer window. Repeated ^T will change the                        format of the window, then finally remove itAlt-V                   Print version informationAlt-H                   Show active chat connectionsAlt-Q                   Same as #quitAlt-R                   Same as #reopenAlt-T                   Restart. Reexecutes mcl. This feature is mainly                        useful for development, but could be helpful if you                         have a read-only config file which you want to                        reread. You have to invoke mcl with the full path name                        for this to work, or have it in your $PATH.PageUp                  Scroll one half-page up in scroll back bufferPageDown                Scroll one half-page downArrow Up/Down           In scroll back: scroll one line up/down                        Outside: activate command historyArrow Left/Right        Move cursor left/right on the input line. New text                        is inserted where the cursor is, pushing old text to                         the right.Control-A/Control-E     Go to the beginning/end of the input lineControl-J               Delete until the end of the lineControl-U               Delete until the beginning of the lineControl-C               Delete current line and insert into the command                        history, but do NOT send it to the MUD. You can                        later recall the command as usual.Control-W               Delete the word to the left                        

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -