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

📄 chat.html

📁 Unix下的MUD客户端程序
💻 HTML
字号:
<h3>Table of contents</h3> <UL><LI><a href="#chap0">How it works</a><LI><a href="#chap1">Configuration options</a><LI><a href="#chap2">Chat definitions</a><LI><a href="#chap3">Chat commands</a><LI><a href="#chap4">Flags</a><LI><a href="#chap5">Chat list</a><LI><a href="#chap6">Connection states</a><LI><a href="#chap7">Chat and the embedded interpreter</a><LI><a href="#chap8">Actions and substitutes</a></UL><PRE>ZMUD/MudMaster compatible chat system=====================================Since 0.52.02, mcl offers a peer-to-peer chat system, which iscompatible with the original MudMaster chat protocol as well as zChat'sextended protocol.The peer-to-peer nature of the chat system means that there is nocentral server through which your message pass: you call up directlythe MudMaster, ZChat/ZMUD or mcl client residing on another person'smachine and communicate directly with them.Stuff currently unimplemented:* Configuration file setting (i.e. Chat <person> {  ... }* File transfer* PGP* Snooping* connection list requests* Setting flags* Some of the commands (e.g. chat.deny)* Chat list via alt-H* Chat actions/substitutesmcl chat has only been tested together with mcl itself, so itprobably does not work yet with ZMUD/MudMaster yet.THIS IS ALPHA QUALITY CODE. There may be holes, buffer overflows,whatnot.</PRE><h3><a name="chap0">How it works</a></h3><PRE>When mcl starts up, it begins to listen on a port (4050). You tellyour conversation partner your IP address and this port number,and he can now call you (using e.g. #chat.call IP 4050).After he connects, his client requests a connection from yours.Unless you are automatically accepting all connections, or haveset up a passphrase which automatically accepts connections fromthat one particular person, you will be asked to accept this incomingconnection (using #chat.accept).Then you are connected; you can see active connections by pressing alt-H.You can chat to that person by using "#chatto <name> <message>" (e.g."#chatto Drylock Hi!").To disconnect someone, use the Alt-H listbox: by selecting a connectionand pressing Delete you will disconnect the person. You can also set variousflags on that connection.There are many additional commands and configurations options. They are coveredin the following chapters.</PRE><h3><a name="chap1">Configuration options</a></h3><PRE>All configuration options as well as all client commands pertainingto the chat subsystem start with "chat." (e.g. "#chat.call").chat.name       Your nickname. Should be 16 characters. mcl will NOT                active the chat system unless you set this configuration                option!chat.baseport   Default: 4050. When mcl starts up, it will try to bind                to the baseport and up to 9 of the following ports if                the 4050 port is already in use.chat.autoaccept Normally you are asked to confirm that you want to accept                an incoming connection. With this option enabled, you will                allow anyone to connect to your clientchat.download   The chat protocol allows for file transfer. This option                control where the files downloaded this way go to. Default                is ~/.mcl/downloads/chat.email      Set this to your email address if you want it to be visible                to people you chat with.chat.icon       Path to a Windows BMP containing the icon for your persona.                This icon is currently only displayed by zChat.chat.debug      Set to 1 to get maximal information about incoming requests.                chat.interfaces A machine can have several IP addresses. For example,                all UNIX machine have 127.0.0.1 on the "loopback" interface.                They may have another, changing address when they connect                to the net via PPP. They may also be in a local network                which means they have a third address on the Ethernet interface.                Using the chat.interfaces option you can tell mcl what interfaces                should be looked for to determine your IP address. The default                is ppp0 eth0 lo, which means mcl will look at your PPP connection                first, then see if you have Ethernet and then finally fall back                to loopback in case you are experimenting with the chat protocol                on a standalone machine.                If you start mcl with PPP down then bring up ppp and use #chat.call,                mcl will perform the scan again and pick hopefully the PPP address.chat.protocol   The default protocol, zchat or chat (MudMaster chat). Defaults to                zchat. Use 0 for Chat, 1 for zChat.chat.paranoia   Prefix all messages with their source (e.g. [Drylock@127.0.0.1] Drylock                chats "hi"). It is the *sender* that formats the message entirely,                including their name (or lack of it).                Note that mcl automatically prefixes the name/IP if it cannot find                the name inside the message.chat.syscolor   Color of system messageschat.chatcolor  Color of chat messages                       </PRE><h3><a name="chap2">Chat definitions</a></h3><PRE>In the configuration file, you can specify special parameters for people youchat with, like default flags and default IP address. The syntax is following:Chat <nickname> {  Host <hostname or IP address> [port]  Password <password>  Flags [flag list]  Protocol <zchat|chat>  Group <group>}As you can see, the syntax is similar to the MUD definition syntax. All thelines within are optional, you can specify as man as you want. Followingconfiguration options are available:Host - this sets the hostname and port (defaults to 4050 if left out) ofyour conversation partner. If this is set, you can use #chat.call <nickname>rather than specifying the IP address. For this to work correctl, your partnermust have a static IP address or must use some sort of DynIP-like servicelike the now-dead ml.orgPassword - If this is set, and the protocol used is zchat, a user withthis nickname must present this password when connecting to you.Flags - list of flags set on this connection. Space-delimitered list offlags described in the <a href="#chap4">"Flags"</a> chapter.Protocol - default protocol used when calling that person.Group - default chat group</PRE><h3><a name="chap3">Chat commands</a></h3><PRE>#chat.call [protocol] <IP address or hostname> [port]#chat.call [protocol] <nickname> [IP address] [port]This initiates a chat session. If you leave out the port, it defaults to 4050.You can specify an IP address or a hostname, mcl will look up the hostname then.You can also specify a nickname. This will retrieve the settings fromyour configuration file. You can still specify an IP address and port tocomplement or override the configuration file settings.You can specifiy a protocol, either zchat (ZMUD zChat enhanced protocol)or chat (the standard MudMaster protocol). For example:#chat.call zchat foobar.orgCall host "foobar.org" port 4050, using zchat protocol.#chat.call bobCall the IP address specified in your "bob" nickname entry#chat.call bob foobar.orgCall foobar.org port 4050 and use other settings from your "bob" nicknameentry#chat.ipRepeat the scan for IP addresses. This is useful when you e.g. have mclrunning, disconnect from the net via PPP then reconnect but get a differentIP address. Note that mcl also executes this commane every time you tryto connect to someone else.#chat.accept [number|name]#chat.reject [number|name]#chat.deny [number|name]#chat.dc [number|name]After someone connects to you, you must accept their connection using#chat.accept. If used without arguments, the command accept the lastconnection to connect. If you DON'T want the connection to beaccepted, you can use #chat.reject to drop it.If you use #chat.deny, the connection will be dropped. In addition,the IP address will be automatically rejected from connecting to youuntil you exit mcl.#chat.dc is used to disconnect an already running session.All 4 commands can either take no arguments (then they affect thefirst appropriate session), a number or the name of the user todisconnect.#chat.listShow a list of current connections as well as list of your nicknames.This commands prints out the list to the output screen; using Alt-H willshow you a nice list box.If your screen is more than 90 characters wide, you will get theverbose list, otherwise you get the shortened list. See explanation ofthe lines under the <a href="#chap5">"Chat list"</a> chapter.#chat.to [emote] <name> <message>#chat [emote] <name> <message>Send a private message to this person. "#chat" by itself is analias for this command.If you specify EMOTE as the first word, your message will be different.The default message is e.g. "Drylock chats to you 'Hi!'". With emote,sending something like "#chat emote smiles" will send "Drylock smiles.".#chat.reply [emote] <message>Executes a #chat.to on the last person to send you a personal chat.#chat.all [emote] <message>#chatall [emote] <message>Send a message to everyone you are connected to. "#chatall" is an alias forthis command. The message looks like this: "Drylock chats to all 'Welcome'".If emote is active, it is simplye "Drylock smiles.".#chat.group <groupname> [emote] <message>#chat.setgroup <groupname> <people list...>Send a message or a emote to a given group. To add members to thegroup, use the #chat.setgroup command (e.g. #chat.setgroup cool Bob Joewill add Bob and Joe to the group cool; if either was already therethey are removed from the group instead).#chat.icon <filename>Change your chat icon. If the file exists, it is sent out to all yourconnections as your new icon. It's not much use for mcl, but I supposesomeone might make a small animated movie with this command.#chat.flags <connection> <changes...>Adjust the settings for this connection. E.g. #chat.flags Drylock +private.You can specify any number of flag names prefixed with + (to set flag),- (to unset flags) or just the flag name (toggling the flag). See the <a href="#chap4">"Flags"</a>section for descriptions of what flags do.#chat.request <connection>|ALL#chat.peek    <connection>|ALLRequests the public connections of all the connections you areconnected to. Upon receiving those connections, mcl will connect to anynew connections it finds this way.#chat.peek is similar, but only shows the connections rather thanconnecting to them.#chat.ping <connection>|ALLSends a Ping packet to that connection. The client in the other endsend pack a response and upon its receival, mcl display the roundtriptime.</PRE><h3><a name="chap4">Flags</a></h3><PRE>These flags can be set with the #chat.flags command.Private: this connection will not be given out when other people do a  #chat.peek or #chat.request.Serving: You will relay #chat.all and #chat.group that have come from  OTHERS to this connectionCommands: You will accept commands from this connection (i.e. the other  person can make your mud client execute any command)Snoop: You will allow this connection to snoop youIgnored: You will see no #chat/#chat.all/#chat.group from this connectionFiles: You will accept files sent from this connectionSnooping:  You are currently snooping that connectionSnooped: You are snooped by that connection</PRE><h3><a name="chap5">Chat list</a></h3><PRE>Pressing Alt-H shows up the current chat list. You can use arrow keysto move around as usual. Pressing the flag letter (I for Ignore, P forPrivate, C for Commands, n for Snoop, F for Files, S for Serving, O forSnooped, d for Snooping) toggles that flag on/off.Pressing Delete disconnects that connection.Pressing Enter allows you to enter a private message to send to thatconnection. Rather than popping up a new window, it simply puts"#chat.to <name> " on your input line.</PRE><h3><a name="chap6">Connection states</a></h3><PRE>First the long description then in parens the short one. *** is a number.INVALID STATE (????)Something has gone really wrong! This is the state that all connections startwith but change from very soon.Connecting (timeout ***) (C***)mcl is trying to get a connection to the other client, but no TCP/IP connectionhas been established yet. Perhaps the network connection is overloaded.Connected, requesting permission (timeout ****) (P***)We have achieved a connection and sent our credentials. The remote client mustnow decided whether to let us in or not.Connected (    )Successfull connection has been established. Either side can now send commandsWaiting for * more command header bytes (Cmd*)A zChat command contains 4 bytes in the header (command number, data bytes). Wehave not yet received all 4.Waiting for *** more bytes of command * (D***)The command also contains a body which contains a certain number of bytes. Herewe are waiting for all of them to arriveWaiting for old style data (D)The MudMaster protocol terminates it data with the character 255. Thus it's notpossible to tell how many more bytes of data may arrive.Accepted, awaiting protocol/chatname (Acc1)Someone has connected to our port but has not said anything yetAccepted, awaiting address/port (Acc2)Someone has connected, but has only told us their protocol and nameWaiting for your accept (Cnfr)Someone has connected and now it's up to you to type #chat.accept to let them inUnknown state: * (I*)An invalid state that not even the state-parser knows about.</PRE><h3><a name="chap7">Chat and the embedded interpreter</a></h3><PRE>Output from chat goes through the usual "output" type triggers.After sucessfull startup, the variables chatIP and chatPort pointat the local IP address and port the chat system is listening on.</PRE><h3><a name="chap8">Actions and substitutes</a></h3><PRE>If you want all chat-related output to be filtered to actions andsubstitutes, create a MUD called "Chat" in your configuration file,and add any actions/substitutes you want to be active to there.Chat output is filtered through the standard embedded scriptingchannels (i.e. the output hook) so things like highlights andgags will work.</PRE>

⌨️ 快捷键说明

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