/ circle3.1 / doc / OLD-DOCS / utils.doc
utils.doc
  1  /**************************************************************************
  2  *  Copyright (C) 1993 - see 'license.doc' for complete information.       *
  3  *  Jeremy Elson; 7/12/93                                                  *
  4  **************************************************************************/
  5  
  6  			    CIRCLEMUD UTILITIES
  7  				"utils.doc"
  8  
  9  
 10  There are currently 12 utilities and several shell scripts which come with
 11  CircleMUD to help you run and maintain it.  This file documents them.
 12  
 13  Brief Synopsis
 14  --------------
 15  AUTOWIZ		Automatically generate a wizlist and an immlist from the
 16  		playerfile.
 17  DELOBJS		Delete the object files (i.e. crash-save, rent, cryo-rent,
 18  		etc.) of players who no longer exist in the playerfile.
 19  HASMAIL		Return an exit status of 0 or 1, depending on if the
 20  		recipient specified has MUDmail waiting or not.
 21  LISTRENT	Show the contents of one of more object files.
 22  MAILINDEX	Generate a list of all mail contained in a mail file.
 23  MUDPASSWD	Change the password of a MUD character in a playerfile.
 24  PURGEPLAY	Create a new playerfile with deadweight characters removed.
 25  READMAIL	Print mail contained in a mail file.
 26  SHOWPLAY	List players contained in a playerfile.
 27  SIGN		Present a sign on a port (i.e. "MUD will be down today").
 28  SPLIT		Split a large file into several smaller files.
 29  SYNTAX_CHECK	Check the syntax of a set of world files.
 30  
 31  
 32  
 33  Detailed Documentation
 34  ----------------------
 35  
 36  AUTOWIZ
 37  
 38  Autowiz is not really meant to be run by a person; the MUD automatically
 39  executes it every time someone reaches immortality or is promoted to an
 40  immort or higher level.
 41  
 42  It must be compiled and in the circle/bin directory in order for the
 43  automatic wizlist system to work, of course.
 44  
 45  
 46  DELOBJS
 47  
 48  delobjs <playerfile> <file1> <file2> <filen>
 49  
 50  Delobjs generates an index of all players in the playerfile, then checks
 51  each file listed on the command line to make sure that the object file
 52  has a corresponding player in the player index.  If the player does not
 53  exist, the object file is deleted.
 54  
 55  Although this program can be run manually, it is much easier simply to
 56  use the "purgeobjs" script in the lib/plrobjs directory.  That script
 57  will automatically run delobjs on every file in each of the 5 object
 58  directory, and save a list of the files deleted to a file called DELETED.
 59  
 60  
 61  LISTRENT
 62  
 63  listrent <file1> <file2> ... <filen>
 64  
 65  Listrent will simply list the contents of an object save file.  You can
 66  list as many files as you like on the command line; the contents of each
 67  file will be listed.
 68  
 69  Included in the lib/plrobjs directory is a script called 'searchfor', which
 70  you can use to see who in the game has certain items.  For example, if you
 71  wanted to see who had object #3001 rented, you would switch into the
 72  lib/plrobjs directory and type "searchfor 3001".
 73  
 74  
 75  
 76  
 77  HASMAIL
 78  
 79  hasmail <mail-file> <recipient-name>
 80  
 81  Hasmail has no output -- it just returns a 0 or 1, depending on if you
 82  have mail waiting or not.  It's useful for putting something like this
 83  in your .login (assuming you use csh):
 84  
 85  set NAME = ras
 86  
 87  if ( { hasmail ~/circle/lib/misc/plrmail $NAME } ) then
 88     echo "You have mud-mail waiting."
 89  endif
 90  
 91  
 92  
 93  MAILINDEX and READMAIL
 94  
 95  CircleMUD's mail files are binary files -- they can't be read with 'cat',
 96  'more', etc.  The MAILINDEX and READMAIL commands allow you to see the
 97  contents of a mail file.
 98  
 99  Obviously, there are a lot of serious privacy issues which go along with
100  programs like this.  For exactly that reason, I didn't even write these
101  utilities for months after I wrote the mail system.  I eventually broke
102  down and wrote them because there is no way to save Mudmail after you've
103  read it from within the MUD, but READMAIL allows you to do just that --
104  read your mail without deleting it.
105  
106  As a footnote, the MUDmail system was intentionally designed so that
107  one is not able to save mail after having read it.  I have a tendency
108  to save all of my (real) email, as do many other people, and I didn't
109  want hundreds of mud players to start saving all their MUDmail at the
110  expense of my disk.
111  
112  Now that I've loaded these utilities with excessive moral baggage, I'll
113  describe how they are used.
114  
115  mailindex <mailfile>
116  readmail <mailfile> <recipient-name>
117  
118  
119  MAILINDEX will show you a list of all letters currently in the mail file,
120  in the following format:
121  
122  Recipient 1
123  	Sender 1
124  	[...]
125  	Sender n
126  Recipient 2
127  	Sender 1
128  	[...]
129  	Sender n
130  [...]
131  Recipient m
132  	Sender 1
133  	[...]
134  	Sender n
135  
136  
137  READMAIL will show you all mail addressed to the recipient you specify.
138  
139  
140  
141  MUDPASSWD
142  
143  mudpasswd <playerfile> <character> <new-password>
144  
145  MUDPASSWD is used to change the password of a character in the playerfile.
146  It can be done while the game is running, but "set passwd" from within the
147  game is probably safer.
148  
149  MUDPASSWD is useful for people who forget their passwords, etc.  SET PASSWD
150  does the same thing.
151  
152  
153  PURGEPLAY
154  
155  purgeplay <playerfile-name>
156  
157  PURGEPLAY will read all the characters in the playerfile you specify, and
158  output a new playerfile called 'players.new', with "deadweight" characters
159  removed.  The original playerfile will not be changed.  Characters meeting
160  one or more of the following criteria will not be included in players.new:
161  
162  	- Buggy characters (i.e., non-alphabetic name or invalid level)
163  	- Characters with a DELETED flag
164  	- Level 0 characters (connected but never entered game)
165  
166  	- If a character is NOT cryo-rented, the following timeouts apply:
167  		- Level 1 characters who have not played in 4 days
168  		- Level 2-4 characters who have not played in 7 days
169  		- Level 5-10 characters who have not played in 30 days
170  		- Level 11-30 characters who have not played in 60 days
171  		- Level 31 characters who have not played in 90 days
172  	- If a character IS cryo-rented, the timout for levels 1-31 is 90 days.
173  
174  	- A CHARACTER WITH A NODELETE FLAG WILL NOT BE REMOVED, even if
175  	  the character meets one or more of the above criteria.
176  
177  PURGEPLAY will generate a report of all characters which were not included
178  in players.new and the reason for their omission.
179  
180  
181  
182  SIGN
183  
184  sign <filename | '-'> <port #>
185  
186  SIGN is used for putting a message on a port, i.e., "BazookaMUD is currently
187  down for repairs."  The second argument can either be the name of a text
188  file or a dash; if it is a dash, SIGN will prompt you for the sign text.
189  Port # is, of course, the port on which you'd like the sign to be displayed.
190  
191  
192  
193  SPLIT
194  
195  Split reads text files from standard input and writes a series of files
196  to disk as output.  Its intended usage it to take a large diku world
197  file and split it into several smaller, more managable files.  You'll
198  probably only need to use it if you're porting a large world file from
199  some other MUD to Circle.
200  
201  To use SPLIT, insert a line containing only "=filename" at each point
202  in the original file where you'd like SPLIT to start writing to a
203  new file.  When SPLIT reaches a line starting with '=', it will begin
204  writing all subsequent lines to a file called 'filename' until the next
205  '=' or EOF is encountered.  #99999 is appended to the end of each file.
206  A file called 'index' is created, containing a list of all files which
207  were created (see running.doc for more information about index files.)
208  
209  
210  
211  SYNTAX_CHECK
212  
213  syntax_check <zone number>
214  
215  Syntax_check is a utility for checking that world files are formatted
216  correctly.  It should be run from the main lib/world directory.  If you
217  type 'syntax_check 30', it will check the files wld/30.wld, obj/30.obj,
218  mob/30.mob, and zon/30.zon.
219