PennMUSH Community

root/1.8.3/trunk/game/txt/hlp/pennchat.hlp

Revision 1032, 17.3 kB (checked in by shawnw, 10 months ago)

Merged 1.8.3p4 into trunk

Line 
1 & CHAT
2 & comsys
3   CHAT SYSTEM
4
5   The MUSH has a built-in chat system with many different channels.
6   These channels vary from MUSH to MUSH; ask at your local site or
7   use @channel/list to see which ones are available.
8
9   You can talk to many people on the MUSH via the chat system, without
10   needing to be in the same room as them. Use the "@channel" command
11   to join, leave, or check who is on a channel, and use the "@chat"
12   or "+" command to communicate.
13
14   If you examine yourself, you will see a list of channels that you are
15   currently listening to. Some channels are restricted to wizards or
16   administrators only. See the following help topics for details:
17     @chat, @channel, @cemit, @clock, cwho()
18
19 & +
20 & @chat
21   @chat <channel> = <message>
22   +<channel> <message>
23
24   This tells everyone on <channel> your <message>. You can prepend
25   <message> with ':' or ';' to pose instead of talk. This command can
26   also be formatted:  +<channel> <message>
27   You do not need to type the complete name of the channel, only as
28   many letters as needed to make it distinct from another channel
29   that you're also on.
30
31   Note: if you use the '+' form of this command, and you do not
32   use the name of a known channel, your command will be processed
33   as normal, preventing user-defined commands like "+last" from
34   being clobbered by the chat system.
35
36 See also: chat, CHAN_USEFIRSTMATCH
37 & @CHATFORMAT
38   @chatformat <object>[= <message>]
39
40   The @chatformat attribute is evaluated when an object receives
41   a channel message. The evaluated result, is displayed to the
42   player, otherwise the default message is shown. A null result,
43   as long as the attribute exists, shows nothing.
44
45   Registers:
46     %0:  The 'type' of the message. It is a single character that
47          will always be set:
48            '"', ';' or ':' for say, semipose and pose, respectively.
49            '|' for an @cemit.
50            '@' for a "system" message - such as "Walker has connected."
51     %1:  The channel name. e.g: "Public" "Admin" "Softcode"
52     %2:  The message as typed (post-evaluation, if necessary) by the
53          speaker.  Be warned, though - If type is '@', then %2 will
54          contain the entire message, and will include the name of
55          the speaker that caused it.
56     %3:  The speaker name, unless channel is set NO_NAME.
57     %4:  The speaker's channel title, unless none is set, or the
58          channel is NO_TITLE.
59     %5:  The original message.
60
61     If The channel is NO_NAME, and the speaker either has no title or
62     the channel is also set NO_TITLE, then %3 will be "Someone"
63
64 (continued in help @chatformat2)
65 See also: @chat, @pageformat, speak()
66 & @CHATFORMAT2
67   Examples:
68
69   Walker's preferred @chatformat, which strips all ansi out, wraps
70   every line to your width and prefixes them with <ChannelName>:
71
72     @chatformat me=<%1> [switch(%0,@,%2,edit(wrap(speak(&[if(%4,%4%b)]%3,
73          %0[stripansi(%2)]),sub(width(%!),add(4,strlen(%1)))),%r,%r<%1>%b))]
74
75   If you're on a system with chat_strip_quote set to "no", you might
76   want to change the "%0%2" arg to speak() to '[switch(%0,",%2,%0%2)]'
77
78   Suppose you want it just like the old version, but anytime somebody
79   says your name, you want it all in red:
80
81     @chatformat me=ansi(if(strmatch(%2,*[name(%!)]*),r,n),%5)
82
83 (More examples in help @chatformat3)
84 & @CHATFORMAT3
85   A popular feature in clients now available in PennMUSH directly:
86   Let's suppose you want "Public" channel chatter to all be green,
87   "Softcode" to be blue and "Admin" to be cyan.
88
89     @chatformat me=ansi(switch(%1,Public,g,Softcode,b,Admin,c,n),%5)
90
91   Maybe you dislike players who re-@name themselves a lot:
92
93     &playernames me=#6061:Walker #7:Javelin #6388:Cheetah
94     @chatformat me=<%1> [switch(%0,@,%2,speak(&[if(%4,%4%b)][firstof(
95            after(grab(v(playernames),%#:*),:),%3)],%2))]
96
97   Or you're writing a loggerbot, and you want to convert all channel
98   input to HTML:
99
100     @chatformat me=CHAT:%1:[edit(switch(%0,@,%2,speak(if(%4,%4%b)%3,%0%2)),
101            &,&amp;,<,&lt;,>,&gt;,%r,<BR>,%b%b,%b&nbsp;)]
102
103 See also: @chat, @pageformat, speak()
104 & CHAN_USEFIRSTMATCH
105   CHAN_USEFIRSTMATCH (any type)
106
107   When this flag is set on an object that uses the chat system,
108   channel name matching will default to the first matching channel
109   in cases of ambiguity. Without this flag, attempting to use an
110   ambiguous partial channel name will produce an error.
111
112 & @cemit
113 & @nscemit
114   @cemit[/noisy|/silent][/noeval] <channel>=<message>
115   @nscemit[/noisy|/silent][/noeval] <channel>=<message>
116
117   This command allows <message> to be directly broadcasted to the
118   players on <channel>. No channel-prefix is prepended unless the
119   /noisy switch is given or the noisy_cemit config option is yes and
120   /silent is not given.  If the /noeval switch is given, the <message>
121   is not evaluated. This command is intended for use in writing
122   extended chat systems.
123
124   @nscemit is a wizard-only version that does not include nospoof
125   information in broadcasts.
126
127 See also: chat
128 & @channel
129   @channel/list [<channel-prefix>]
130   @channel/what [<channel-prefix>]
131   @channel/on <channel>[=<player>]
132   @channel/off <channel>[=<player>]
133
134   The basic form of this command allows you to see the available
135   channels, and join or leave a channel. You do not need to type the
136   complete name of the channel, only as many letters as needed to make
137   it distinct from other channels.
138
139   Wizards may add and remove other players from channels by providing
140   a player name as a second argument.
141
142   Channels may be restricted in who can join them and/or speak on
143   them. @channel/list will show you the channel's name, number of users,
144   number of message since last restart, access information, and your
145   status. See "help channel-list" for an explanation of how to read
146   the listing.
147
148   @channel/what will show you the channel's name, access information,
149   and a description of the channel's purpose.
150
151   More commands are provided in "help @channel2".
152  
153 See also: chat
154 & @channel2
155   @channel/who <channel>
156   @channel/hide <channel> = <yes|no>
157   @channel/title <channel> = <string>
158
159   The @channel/who command shows you who is currently on a channel,
160   if you are permitted to see it.
161
162   Some channels allow their users to hide from the @channel/who list.
163   If you're on such a channel and are permitted to hide, you can
164   use @channel/hide <channel>=yes to hide yourself, and
165   @channel/hide <channel>=no to reappear.
166
167   @channel/title lets you set a title to appear before your name
168   when you speak on the channel. If you leave the channel, your
169   title is cleared; use @channel/gag instead (see help @channel3).
170   You should escape any commas in your title with backslashes.
171
172   See "help @channel3" for more.
173 & @channel3
174   @channel/mute <channel> = <yes|no>
175   @channel/gag <channel> = <yes|no>
176   @channel/recall <channel> [ = <lines|duration>[,<start line>] ]
177
178   Some channels broadcast messages when players connect or disconnect from
179   the MUSH. If you don't want to hear those messages, use @channel/mute
180   <channel>=yes. To resume hearing the messages, use @channel/mute
181   <channel>=no or @channel/unmute <channel>. Leave out <channel>
182   to mute or unmute all channels.
183
184   If you want to remain on a channel but not receive any messages
185   on the channel, use @channel/gag <channel>=yes. To resume hearing,
186   use @channel/gag <channel>=no (or @channel/ungag <channel>). When
187   you disconnect, the channel will be automatically ungagged for you.
188   Leave out <channel> to gag or ungag all channels.  If the channel does
189   not have the "open" priv, you can not speak on it while you are gagged.
190
191   @channel/recall shows you the most recent messages on the channel;
192   the number of messages depends on how the channel is configured, but
193   can be limited by specifying <lines> to show and a <start line> to
194   start display from.  If <lines> is an elapsed time, like '1h',
195   messages from within the given interval will be recalled.  You must
196   be on a channel to recall from it.
197
198   See "help @channel4" for more.
199 & @channel4
200   @channel/add <channel> [= <priv>]
201   @channel/delete <channel>
202   @channel/desc <channel> = <desc>
203   @channel/rename <channel> = <new name>
204
205   @channel/add creates a new channel. On some MUSHes, any player
206   can create a new channel, though there will be a cost associated
207   with creation (see @config chat). Possible <priv> specifications:
208   * "player" - players may use the channel
209   * "object" - objects may use the channel
210   * "admin" - only royalty/wizards/chat_privs may use the channel
211   * "wizard" - only wizards may use the channel
212   * "quiet" - channel will not show connection messages
213   * "open" - you may speak even if you aren't listening to the channel
214   * "hide_ok" - you may hide from the channel who list.
215   * "notitles" - chantitles are not displayed in channel messages.
216   * "nonames" - player names are not displayed in channel messages.
217   * "nocemit" - @cemit is prohibited on the channel.
218   * "interact" - Interaction rules (defined in local.c) are applied to
219     the channel
220   Specifications may be combined, space-separated. Default is determined
221   by the 'channel_flags' @config option, or 'player' if not set.
222
223   @channel/delete removes a channel. You must own it or be Wizard.
224   @channel/desc sets the channel's description, shown on @channel/what.
225     Descriptions are limited to 256 characters. If there are any commas
226     in the description, the whole string should be enclosed in {}'s.
227   @channel/rename is used to rename a channel.
228
229   See "help @channel5" for more. See also "help @clock".
230 & @channel5
231   @channel/priv <channel> = <new priv level>
232   @channel/wipe <channel>
233   @channel/buffer <channel> = <lines>
234   @channel/decompile[/brief] <channel>
235   @channel/chown <channel> = <new owner>
236
237   The "priv" switch sets the channel's access privileges to those specified.
238   The "wipe" switch clears a channel of players without deleting it.
239   The "buffer" switch sets the maximum number of full-length lines that
240   the channel will buffer for @chan/recall. Many more shorter lines may
241   actually be buffered. Setting it to 0 turns off buffering.
242
243   The "decompile" and "chown" switches can only be used by Wizards.
244   @channel/decompile produces a decompile of matching channels. If the
245   /brief switch is included, players on the channel aren't listed.
246   @channel/chown allows a Wizard to change the owner of a channel.
247
248 & channel-list
249 Here's the legend for reading the @channel/list output:
250
251 Channel Name               Num Users Num Msgs  Access Locks     Status  Buf
252 Sample                             1        0 [DPOWQHo jsmvh*] [On  QH]   4
253                                                ||||||| ||||||   |   ||    |
254 Channel is DISABLED----------------------------/|||||| ||||||   |   ||    |
255 Channel allows PLAYERS--------------------------/||||| ||||||   |   ||    |
256 Channel allows OBJECTS---------------------------/|||| ||||||   |   ||    |
257 Channel is Wizard-only (W) or Admin-only (A)------/||| ||||||   |   ||    |
258 Channel is QUIET-----------------------------------/|| ||||||   |   ||    |
259 Channel is HIDE_OK----------------------------------/| ||||||   |   ||    |
260 Channel is OPEN (non-members can speak on it)--------/ ||||||   |   ||    |
261 Channel has @clock/join set----------------------------||||||   |   ||    |
262 Channel has @clock/speak set----------------------------/||||   |   ||    |
263 Channel has @clock/mod set-------------------------------/|||   |   ||    |
264 Channel has @clock/see set--------------------------------/||   |   ||    |
265 Channel has @clock/hide set--------------------------------/|   |   ||    |
266 Player is the owner of the channel--------------------------/   |   ||    |
267 Player is currently on/off/gagging the channel------------------/   ||    |
268 If on, player has the channel muted---------------------------------/|    |
269 If on, player is hiding on the channel-------------------------------/    |
270 Size of the channel buffer in full-length lines---------------------------/
271 & @clock
272   @clock/join <channel> [= <key>]
273   @clock/speak <channel> [= <key>]
274   @clock/see <channel> [= <key>]
275   @clock/hide <channel> [= <key>]
276   @clock/mod <channel> [= <key>]
277
278   The @clock command modifies the a lock on a chat channel if the
279   extended chat system is in use. If no key is specified, the
280   lock is unlocked. Evaluation locks will not work with @clock.
281   See help @clock2 for information on using indirect locks.
282
283   The "join" lock restricts who can join the channel.
284   The "speak" lock restricts who can speak to the channel.
285   The "see" lock restricts who can see the channel on @channel/list
286   The "hide" lock restricts @channel/hide if the channel is hide_ok.
287   The "mod" lock restricts who can modify the channel. If you pass the
288   mod lock on the channel, you can do anything short of deleting it.
289
290   When new channels are added, the mod lock is set to the creator/owner,
291   and all other locks are unlocked.
292
293   See help @clock2 for how to use indirect locks to lock a channel to
294   anything.
295
296 & @clock2
297 If user-defined locks are available, you can use indirect @clocks
298 to lock a channel to a lock of any type (including evaluation locks)
299 on a VISUAL object. This channel can only be joined by an UNFINDABLE player:
300
301   >@clock/join unfindchannel=@#10
302   >@lock/user:ChanJoinLock #10=isunfind/1
303   >&isunfind #10=[hasflag(%#,unfindable)]
304   >@set #10 = VISUAL
305
306 @clock                  Corresponding default user: lock for object
307 join                    ChanJoinLock
308 speak                   ChanSpeakLock
309 see                     ChanSeeLock
310 hide                    ChanHideLock
311 mod                     ChanModLock
312
313 You can lock multiple channels to the same object by specfiying a
314 specific indirect lock instead of the default one:
315
316   >@clock/join onechannel=@#10/onechanneljoin
317   >@clock/join anotherchannel=@#10/anotherchanneljoin
318   >@lock/user:onechanneljoin #10 = 1
319   >@lock/user:anotherchanneljoin #10 = isunfind/1
320 & COWNER()
321   cowner(<channel>)
322
323   Returns the dbref of the owner of a channel.
324 & CTITLE()
325   ctitle(<channel>,<object>)
326
327   Returns <object>'s @chan/title on <channel>. You must either
328   be able to examine the object, or it must visible be on a channel
329   which you are allowed to join.
330 & CSTATUS()
331   cstatus(<channel>,<object>)
332
333   Returns <object>'s status with respect to <channel>, which may be
334   "Off", "On", or "Gag". You must either be able to examine the object,
335   or it must visible be on the channel; "Off" is returned for
336   objects that you can not see on the channel.
337 & CDESC()
338 & CUSERS()
339 & CMSGS()
340 & CBUFFER()
341   cdesc(<channel>)
342   cusers(<channel>)
343   cmsgs(<channel>)
344   cbuffer(<channel>)
345
346   Return the description, number of users, number of messages,
347   or buffer size of <channel>, respectively. This information is
348   also displayed in @chan/list.
349 & CWHO()
350   cwho(<channel>)
351  
352   This returns a list of connected dbrefs who are on <channel>.
353   When used by mortals, hidden/DARK players do not appear on the list.
354 & CEMIT()
355   cemit(<channel>, <message>[, <noisy>])
356
357   Sends a message to all players listening to the given chat channel.
358   See help @cemit for details.
359
360   If the third argument is a true value, the channel name will be
361   prepended to the message, behaving like @cemit/noisy.
362 & CFLAGS()
363 & CLFLAGS()
364   cflags(<channel>)
365   cflags(<channel>,<object>)
366   clflags(<channel>)
367   clflags(<channel>,<object>)
368
369   With one argument, cflags() returns a list of flags set on the
370   given channel, represented as a string of characters. See
371   'help channel-list' for the list of flags (they appear in the
372   "Access" column). You must be able to see the channel to use this
373   function.
374
375   With two arguments, cflags() returns a list of flags for that
376   object on that channel, currently a string consisting of zero
377   or more of "G" (gagging), "Q" (muted), and "H" (hidden).
378   You must be able to see that channel and to examine the object
379   to use this function. If the object is not on the channel, an
380   error is returned.
381
382   The clflags versions return a space-separated list of flag names,
383   rather than a string of flag characters.
384 & CHANNELS()
385   channels([<delimiter>])
386   channels(<object>)
387   channels(<object>[,<delimiter>])
388
389   With no arguments, channels() returns the list of all channel names
390   which are visible to the player. With two arguments, returns the list
391   of channel names to which the object is listening, delimited by
392   <delimiter>.
393
394   With one argument, the behavior is ambiguous. If the argument
395   matches an object, returns the list of names to which the object
396   is listening, space-delimited. If not, it's treated as a no-argument
397   case with a delimiter.
398
399   If you don't have permission to examine the object, you only see
400   those channels to which the object belong for which you have
401   permission to join (or are joined to).
402 & CLOCK()
403   clock(<channel>[/<locktype>][, <new lock>])
404
405   With one argument, returns the value of a lock on a channel, if you
406   own the channel or are See_All.  If no locktype is given, "JOIN"
407   is assumed.
408   With two arguments, sets the lock if you would be able to do so via
409   @clock.
410
411 See also: @clock
412 & CRECALL()
413   crecall(<channel>[, <lines> [, <start line> [, <osep> [, <timestamps?> ]]]])
414
415   This function is the functional form of @chan/recall, and returns a
416   string containing the recalled lines from the channel, separated by
417   <osep>. If <timestamps?> is a true value, the recalled lines will
418   include their timestamps; otherwise, they will not.
419
420 See also: @channel3
421 & Channel functions
422   Channel functions work with the channel system.
423
424   cbuffer()     cdesc()       cemit()       cflags()      channels()
425   clflags()     clock()       cmsgs()       cowner()      crecall()
426   cstatus()     ctitle()      cusers()      cwho()
Note: See TracBrowser for help on using the browser.