/* \ \ | | |\ __ |\ |\ \ \ | | | \ / \ / / | \ | \ \ \| | | |\ \ / / \ \ / / | |\ \ | |\ \ \| | | | \ \ \ \ / / | | \ \ | | \ \ | | | | \ \ \ / / | | \ \ | |\ \ \ | | | | | | / / \ | | | | | |\ \ \ | | | | | | / / \ \ __ | | | | | | \ \ | | | | | | / / \ \ / / | | | | | | \ | | | | | | / / \_/ | | | | | | Copyright 1992 Dwarven Development. "If it ain't dwarven, it ain't worth killin' elves with." */ /******************************************************************** ** Filename : Empclient Exec (Release 2) ** ** Purpose : A simple client for empire that allows VM users ** ** some of the luxuries enjoyed by those Unix users ** ** Date : 01/93 ** ** Updated : 03/93 ** ** Added RXSCOKET Version 2.0 support ** ** Changed piping mechanism, now uses pipes and stem ** ** no longer uses FILE/FILTER keywords, but it makes ** ** more sense syntacticly. ** ** Author : Lord Drazz'zt (a.k.a Sam Tetherow) ** ** : ucpl079@unlvm.unl.edu ** ********************************************************************/ arg game call Initialize call Connect game /*---------------------------------------------------------------------+ | Main socket loop. | +---------------------------------------------------------------------*/ do forever if ((externals()^=0 | queued()^=0) & cmd_code^=1) then call handle_keyboard_input if (VERSION1) then do rc=FD_ZERO('readmask') rc=FD_SET('0', 'readmask') rc=FD_SET(socket, 'readmask') rc=Socket('Select', socket+1, 'readmask', 0, 0, 0) if (rc==-1) then emperror("Select:" errno) if (rc>0) then do if (FD_ISSET('0', 'readmask')^=0) then call handle_keyboard_input if (FD_ISSET(socket, 'readmask')^=0) then call handle_socket_input end end else do /** !VERSION1 **/ Parse Value Socket('Select', 'Read * Write Exception',0) with rc slist if (rc^=0) then emperror("Select:" slist) parse var slist . 'READ' slist 'WRITE' . if (wordpos("0", slist)^=0) then call handle_keyboard_input if (wordpos(socket, slist)^=0) then call handle_socket_input end end /*---------------------------------------------------------------------+ | Handle_Keyboard_Input: Read stuff out of the queue and process it. | +---------------------------------------------------------------------*/ handle_keyboard_input: if (cmd_code==1) then do /* Make sure we aren't waiting for */ Say 'Waiting on output.' /* a previous command to finish */ return end parse pull data if (left(data,1)==CMD_PREFIX) then /* Check to see if it is an */ call Int_Cmds right(data,length(data)-1) /* Internal command */ else Parse Value EmpSend(data) with rc . return /*---------------------------------------------------------------------+ | Hand_Socket_Input: Read stuff from the socket. | +---------------------------------------------------------------------*/ handle_socket_input: Parse Value EmpRead() with rc len line if (autologin<3) then call Auto_Login else call handle_screen line return /*---------------------------------------------------------------------+ | Handle_Screen: Take care of the output processing from the socket. | +---------------------------------------------------------------------*/ handle_screen: incoming=arg(1) leftover=leftover||incoming nl='15'x do forever /* Break the lines at \n */ if (index(leftover,nl)==0) then leave parse var leftover print (nl) leftover parse var print cmd_code print if (cmd_code^=6 & cmd_code^=4) then do /* If data is command output */ if (redirecting) then do /* If redirecting send to a stem */ empcmd.0=empcmd.0+1; y=empcmd.0 empcmd.y=print end else say print /* If ^redirecting send to screen */ end else do /* If we are at an input prompt */ if (redirecting) then do redirecting=0 address cms 'PIPE STEM empcmd. |' rest_o_pipe rest_o_pipe='' end if (cmd_code==6) then say ':' print else say '<_>:' print /* give us a prompt */ end if (redirecting==0) then do hist.line_number=print;line_number=line_number+1; if (line_number>4000) then line_number=1 if (logging==1) then do push print 'EXECIO 1 DISKW 'filename filetype filemode end end end return /*---------------------------------------------------------------------+ | Int_Cmds: Process client commands. | +---------------------------------------------------------------------*/ Int_Cmds: data=arg(1) parse var data command parameters upper command select when (Abbrev('ALIAS',command,2)) then call Alias parameters when (Abbrev('ANNOUNCE',command,2)) then call Telegram 0 parameters when (Abbrev('PIPE',command,3)) then call Pipe parameters when (Abbrev('CMS',command,1)) then do address cms parameters say '' end when (Abbrev('DUMPHISTORY',command,2)) then do dumphistory=1 call History parameters dumphistory=0 end when (Abbrev('EXEC',command,1)) then call execute parameters when (Abbrev('HELP',command,2)) then call Help parameters when (Abbrev('HISTORY',command,1)) then call History parameters when (Abbrev('LOG',command,1)) then call Logging parameters when (Abbrev('QUIT',command,1)) then do Parse Value Socket('Close',socket) with rc Parse Value Socket('Terminate') with rc exit end when (Abbrev('QUOTE',command,3)) then call Quote parameters when (Abbrev('REPEAT',command,3)) then call Repeat parameters when (Abbrev('TELEGRAM',command,1)) then call Telegram 1 parameters otherwise do if macros.0>0 then do x=1 to macros.0 if translate(command)==translate(word(macros.x,1)) then do RC=Evaluate(macros.x,parameters) return end end say 'Unknown command : 'command end end return /*---------------------------------------------------------------------+ | Execute: Cram a file onto the stack to be processed like a string | | of keyboard input. | +---------------------------------------------------------------------*/ Execute: parse arg filename filetype filemode if filetype=='' then filetype='empexec' 'set cmstype ht' state filename filetype filemode found=rc 'set cmstype rt' if (found^=0) then do say 'File 'filename filetype filemode' not found.' return end 'execio * diskr 'filename filetype filemode '(FINIS' return /*---------------------------------------------------------------------+ | Alias: Take care of aliasing. | +---------------------------------------------------------------------*/ Alias: match=0 if arg(1)=='' then if macros.0>0 then do x=1 to macros.0 say macros.x end else say 'No aliases defined.' else do if (macros.0>0) then do x=1 to macros.0 if word(arg(1),1)==word(macros.x,1) then do macros.x=arg(1); match=1; end end if match^=1 then do macros.0=macros.0+1 x=macros.0 macros.x=arg(1); say word(arg(1),1) 'redefined.' end else say word(arg(1),1) 'defined.' end return /*---------------------------------------------------------------------+ | Evaluate: Process the macros to a sendable state. | +---------------------------------------------------------------------*/ Evaluate: macro=arg(1) params=arg(2) do x=1 to words(params) argument.x=word(params,x) end parse var macro . macro do while macro^='' newcommand='' parse var macro command';'macro if pos('$',command)^=0 then do do y=1 to words(command) if left(word(command,y),1)=='$' then do number=right(word(command,y),length(word(command,y))-1) if datatype(number)=='NUM' then do newcommand=newcommand argument.number end else newcommand=newcommand word(command,y) end else newcommand=newcommand word(command,y) end end else newcommand=command queue strip(newcommand) end return 1 /*---------------------------------------------------------------------+ | Pipe: send command output from the server somewhere. | +---------------------------------------------------------------------*/ Pipe: arguments=arg(1) parse var arguments command '|' rest_o_pipe empcmd.=''; empcmd.0=0; redirecting=1 push command call handle_keyboard_input return /*---------------------------------------------------------------------+ | Take care of connection logging. | +---------------------------------------------------------------------*/ Logging: arg file if (file=='OFF') then do logging=0 say 'Logging off.' 'execio 0 diskw 'filename filetype filemode '(FINIS' return end parse var file filename filetype filemode '('aeb if (filetype=='') then filetype='EMPLOG' if (filemode=='') then filemode=DEFAULT_FILEMODE aeb=translate(strip(aeb)) 'set cmstype ht' STATE filename filetype filemode found=rc 'set cmstype rt' if (found==0) then do say filename filetype filemode 'already exits.' do while (logging^=1) if (aeb=='') then do say 'ppend, rase, or aort?' pull aeb end select when (aeb=='B') then return when (aeb=='E') then do 'ERASE 'filename filetype filemode logging=1 end when (aeb=='A') then logging=1 otherwise say 'Huh?' end aeb='' end end else logging=1 say 'Logging to: 'filename filetype filemode return /*---------------------------------------------------------------------+ | History: Show previous lines of output from range begin to end | | before the current line. | +---------------------------------------------------------------------*/ History: arg begin end if (end=='') then end=0 if (datatype(begin)^='NUM' | datatype(end)^='NUM') then do say 'History command needs numeric arguments.' return end if (begin0 then do times push string end end return /*---------------------------------------------------------------------+ | Telegram: Sends a file to the host as a telegram or an announcement.| | It takes care of breaking it up into 512 blocks. | +---------------------------------------------------------------------*/ Telegram: parameters=arg(1) parse var parameters type nation file if (type==0) then file=nation file 'set cmstype ht' state file found=rc 'set cmstype rt' if (found^=0) then do say 'File not found.' return end 'execio * diskr 'file '(FINIS' msgcount=0 if (type==1) then Parse Value EmpSend("tele "nation) with rc else Parse Value EmpSend("anno") with rc do queued() parse pull line msgcount=msgcount+length(line)+1 if (msgcount<512) then Parse Value EmpSend(line) with rc else do msgcount=0 Parse Value EmpSend(".") with . if (type==1) then Parse Value EmpSend("tele "nation) with rc else Parse Value EmpSend("anno") with rc msgcount=msgcount+length(line)+1 Parse Value EmpSend(line) with rc end end Parse Value EmpSend(line) with rc return /*---------------------------------------------------------------------+ | Load_Version: Loads the game VERSION file and sets the GLOBALVs | +---------------------------------------------------------------------*/ Load_Version: 'execio * diskr 'game' version' 'GLOBALV SELECT EMPIRE SET GAME 'game do queued() parse pull global value 'GLOBALV SELECT EMPIRE SET 'global value end return /*---------------------------------------------------------------------+ | EmpSend: Send a string to the server. | +---------------------------------------------------------------------*/ EmpSend: line=arg(1) data=E2A(line)||'0A'x if (VERSION1) then do rc=Socket('Write', socket, data) if rc>=0 then do len=rc rc=0; end else len=errno end else Parse Value Socket('Write', socket, data) with rc len if (rc^=0) then emperror("Write:" len) return rc /*---------------------------------------------------------------------+ | EmpRead: Receive a string from the server. | +---------------------------------------------------------------------*/ EmpRead: if (VERSION1) then do rc=Socket('Read', socket, 'data') if (rc>=0) then do len=rc rc=0; end else data=errno end else Parse Value Socket('Read', socket) with rc len data if (rc^=0) then emperror("Read:" data) if (len==0) then emperror() return rc len A2E(data) /*---------------------------------------------------------------------+ | EmpError: Come here if we have had an error. | +---------------------------------------------------------------------*/ emperror: if (socket>0) then Parse Value Socket('Close',socket) with rc Parse Value Socket('Terminate') with rc if (arg(1)=='') then exit(0) else do say arg(1) exit(-1); end return /*---------------------------------------------------------------------+ | Connect: make the connection to the game. | +---------------------------------------------------------------------*/ Connect: arg game 'NAMEFIND :nick' game ':ipa :prt :coun :rep (STACK FILE EMPIRE' if (rc^=0) then parse var game address port coun rep else do parse pull address parse pull port parse pull coun parse pull rep 'GLOBALV SELECT EMPIRE SET GAME' game 'state' game 'version a' if RC==0 then call Load_Version end if (address=='' | port=='') then emperror('EmpClient address port') if (coun=='') then autologin=4 else autologin=0 if (VERSION1) then do socket=Socket('Socket', 'AF_INET', 'Sock_Stream') if (socket==-1) then rc=socket else rc=0 end else Parse Value Socket('Socket') with rc socket if (rc^=0) then emperror("Socket:"||socket) say 'Connecting to 'game' at 'address port'.' if (VERSION1) then do parse var address h1 '.' h2 '.' h3 '.' h4 '.' . if (datatype(h1,'n') & datatype(h2,'n') & datatype(h3,'n') & datatype(h4,'n')) then host=d2c(h1) || d2c(h2) || d2c(h3) || d2c(h4) else do host=Socket('Gethostbyname', address) if (host==-1) then emperror('Gethostbyname:' errno) end name=AF_INET || Htons(port) || host rc=Socket('Connect', socket, name) if (rc^=-1) then rc=0 else error=errno end else Parse Value Socket('Connect', socket, 'AF_INET' port address) with rc errno error if (rc^=0 & errno<>'EINPROGRESS') then emperror("Connect:" error) Parse Value Socket('Ioctl', socket, 'FIONBIO', 1) with rc error if (rc^=0) then emperror("Ioctl:" error) Parse Value Socket('Fcntl', socket, 'F_SETFL', 'FNDELAY') with rc error if (rc^=0) then emperror("Fcntl:" error) return /*---------------------------------------------------------------------+ | Handle autologin sequence. | +---------------------------------------------------------------------*/ Auto_Login: select when (autologin==0) then do if (left(line,21)^='2 Empire server ready') then do say 'Weird host format,aborting auto-login('autologin')' autologin=3 call handle_screen line end else do Parse Value EmpSend('coun 'coun) with rc autologin=1 end end when (autologin==1) then do if (word(line,1)^='0') then do say 'Invalid country name,aborting auto-login('autologin')' autologin=3 call handle_screen line end else do Parse Value EmpSend('pass 'rep) with rc autologin=2 end end when (autologin==2) then do if (word(line,1)^='0') then do say 'Invalid rep name,aborting auto-login('autologin')' autologin=3 call handle_screen line end else do Parse Value EmpSend('play') with rc autologin=3 end end end return /*---------------------------------------------------------------------+ | Initialize: Take care of some startup stuff | +---------------------------------------------------------------------*/ Initialize: CMD_PREFIX='/' /* Set internal command prefix */ DEFAULT_FILEMODE='A0' /* Set the default filemode */ 'terminal linend off' /* allow use of the # sign */ 'terminal esc off' /* allow use of the ' sign */ line_number=1 /* Set the inital history line# */ hist.='' /* Clear the history variable */ leftover='' /* Clear the leftover string */ cmd_code=6 /* Inital server command mode */ redirecting=0 /* Insure redirecting is off */ /* Initialize RXSOCKETs */ Parse Value Socket('Version') with VERSION1 if VERSION1==-1 then VERSION1=1 else VERSION1=0 if (VERSION1) then do rc=Socket('Initialize', 'EmpC') if (rc==-1) then maxdesc=errno else do maxdesc=rc rc=0; end end else Parse Value Socket('Initialize','EmpC') with rc maxdesc if (rc^=0) then emperror("Initialize" maxdesc) /* Check for the macro files */ 'set cmstype ht' 'STATE 'GAME' MACROS' if RC==0 then 'EXECIO * DISKR 'GAME' MACROS' else do 'STATE EMPIRE MACROS' if RC==0 then 'EXECIO * DISKR EMPIRE MACROS' end 'set cmstype rt' macros.0=queued() if macros.0>0 then do x=1 to macros.0 parse pull macros.x end say 'Initialization complete.' return /*---------------------------------------------------------------------+ | A2E: Convert a string for ascii to ebcdic. Written by me. | +---------------------------------------------------------------------*/ A2E: return translate(arg(1), , '00000000000000000005150000000000'x||, '00000000000000000000000000000000'x||, '405A007B5B6C507D4D5D5C4E6B604B61'x||, 'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||, '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||, 'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'x||, '79818283848586878889919293949596'x||, '979899A2A3A4A5A6A7A8A9C04FD0A100'x||, '00000000000000000000000000000000'x||, '00000000000000000000000000000000'x||, '005A007B5B6C507D4D5D5C4E6B604B61'x||, 'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||, '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||, 'D7D8D9E2E3E4E5E6E7E8E941E0425F6D'x||, '79818283848586878889919293949596'x||, '979899A2A3A4A5A6A7A8A9C04FD0A100'x) /*---------------------------------------------------------------------+ | E2A: Convert a string for ebcdic to ascii. | | This is taken from the E2A EXEC found with RXSOCKETs and is | | credited to JCA (don't know the full name, but thanks a ton! | +---------------------------------------------------------------------*/ E2A: return translate(arg(1), , '000102030009007F0000000B0C0D0E0F'x||, '1011121300000800181900001C1D1E1F'x||, '00000000000A171B0000000000050607'x||, '0000160000000004000000001415001A'x||, '20000000000000000000002E3C282B7C'x||, '2600000000000000000021242A293B7E'x||, '2D2F0000000000000000002C255F3E3F'x||, '005E00000000000000603A2340273D22'x||, '00616263646566676869007B00000000'x||, '006A6B6C6D6E6F707172007D00000000'x||, '007E737475767778797A0000005B0000'x||, '000000000000000000000000005D0000'x||, '7B414243444546474849000000000000'x||, '7D4A4B4C4D4E4F505152000000000000'x||, '5C00535455565758595A000000000000'x||, '30313233343536373839000000000000'x) /*---------------------------------------------------------------------+ | Help: Online help, everything here is covered in the empclient help | | file. It is pretty darn ugly looking, but I hate doing doc. | +---------------------------------------------------------------------*/ Help: arg topic select when translate(topic)=='CHANGES' then do say 'Changes:' say ' The only playability change made for this release was the' say 'change in the /pipe command, which now requires pipelines.' say 'Internally it got ugly, I added in the capability to handle' say 'either of Arty's RXSOCKET versions. The user does not need to' say 'know which version he/she is running on, the client will figure' say 'that out on it's own.' end when translate(topic)=='REQUIREMENTS' then do say 'Requirements:' say ' This client was written on a VM/CMS rel 6 machine with FAL 2.2, and it' say "also operates running VM/ESA. It uses Arty Ecock's RXSOCKET MODULE 0.1f" say 'available from the LISTSERV@PUCC, or RXSOCKET MODULE 2.0 available' say 'from LISTSERV@CUNYVM. It also utilizes CMS PIPELINES for the /pipe' say 'client command. say ' I cannot gaurantee that this software will run on anything else and' say 'I doubt that I would be able to get it running on anything else since' say 'I do not have access to any other system, and am by no means a VM/CMS' say 'guru.' end when translate(topic)=='BACKGROUND' then do say 'Background:' say ' Empclient Exec was written one weekend when I was completely fed up' say 'with the lack of support for empire clients for VM, I do not know of' say 'any publically released empire clients for VM, and only one client for' say 'mudders (so expect a couple of mud related clients soon if you are' say 'looking for one of them too.)' end when translate(topic)=='SUPPORT' then do say 'Support:' say ' This client is probably far from being done (I hope), and changes will' say 'be made and sent out as added and tested. This client should not be' say "considered anything other than an alpha release since I haven't had" say 'anyone else play with it, and I am sure there are hundreds of bugs that' say 'will crop up. If you happen to find one of these critters, send me mail' say 'describing what happened and if you happen to know how to fix it that' say "would help also. I don't gaurantee that it will be fixed imediately" say '(I hope so, but things happen) but I will atleast put it in a BUGS file' say 'so that others know it exists and can avoid it until it is fixed.' say ' If you have any ideas that you would like to see implemented or have' say 'implemented yourself send me mail and I will see what I can do about' say 'getting them into the next release. One thing to note, if they deal' say 'with fullscreen mode I doubt they will get put in for awhile. I looked' say 'into using fullscreen mode after seeing the only other client out for' say 'VM, but I decided to stay away from that aspect due to system response' say "Time in fullscreen mode, and some of the other wierd aspects that I don't" say 'fully understand when dealing with fullscreen mode in VM.' end when translate(topic)=='HOW_TO_USE' then do say 'How To Use It:' say ' Empclient is a pretty simple client to invoke it you can either use' say 'EMPCLIENT address port country rep ' say 'or you can use a names file if you are keeping track of more than one' say 'game. The format of the names file is : ' say ':nick.name_of_game :ipa.address_of_game :prt.port_of_game' say ' :coun.your_country_name :rep.your_password' say 'both the coun and rep fields are optional, but if you specify them the' say 'client will try and log in for you.' say ' ' say ' I have added in a few built in commands to make life easier for those' say "of us who don't get the bonuses afford to the unix users out there." say "All internal (client) commands are preceeded with a / (if you don't" say 'like this syntax you can change the leading charcter by changing the' say 'CMD_PREFIX variable in the initialization procedure.' end when translate(topic)=='ALIAS' then do say ' ALIAS' say 'Set up an alias for a command or string of commands.' say ' /alias command-alias command{;command;.....}' say 'The alias command allows you to set up a one word command to do a series' say 'of commands. See the section on macros for the full syntax of aliases.' end when translate(topic)=='ANNOUNCE' then do say ' ANNOUNCE ' say 'Send a file to the game to be posted as an announcement.' say ' /announce filename filetype filemode' say 'The announce command will break the file up into 512 character blocks,' say 'or as close as it can get without splitting lines. The only problem' say 'that I have found is that it adds a blank line where it breaks the file' say 'up. ' end when translate(topic)=='CMS' then do say ' CMS ' say 'Send a command to cms for execution. ' say ' /cms command' say 'Send a command to cms. (e.g. flist or any other cms command, including' say 'other execs) ' end when translate(topic)=='DUMPHISTORY' then do say ' DUMPHISTORY ' say 'Dump a section of history to a file. ' say ' /dumphistory x y' say 'Dumps the output from history x y to the file DUMPHISTORY FILE A' end when translate(topic)=='EXEC' then do say ' EXEC ' say 'Dump a file onto the stack to be sent interactively to the server.' say ' /exec filename filetype filemode' say 'Pushes a file onto the stack to be read as if it were keyboard input. It' say 'has the added advantage of being able to issue client commands along with' say 'empire commands.' end when translate(topic)=='HISTORY' then do say ' HISTORY ' say 'Show a section of the history buffer.' say ' /history x{,y}' say 'Show the last x lines of output from the server, or the range the last x' say 'to the last y of lines of output from the server.' end when translate(topic)=='LOG' then do say ' LOG ' say 'Dump all output from the server to a file. ' say ' /log filename filetype filemode (a|e|b' say 'Start logging the output from the server. The (a|e|b allows you to' say 'circumvent the prompt if the file already exits.' say ' /log off' say 'Shuts logging off. ' end when translate(topic)=='PIPE' then do say ' PIPE ' say 'Send output from a server-command through a pipeline.' say ' /pipe server-command | rest_of_pipe' say 'Sends the output of the server-command to a cms pipeline.' end when translate(topic)=='QUIT' then do say ' QUIT ' say 'Close the socket and exit from empclient.' say ' /quit' say 'Close the socket. This does not send a logoff to the game, it just drops' say 'the connection. ' end when translate(topic)=='QUOTE' then do say ' QUOTE' say 'Send a file to the server. ' say ' /quote filename filetype filemode ' say 'Send the file filename filetype filemode down the socket to the server.' say 'Quote does not allow the use of client commands in the file, but it does' say 'have the advantage of not waiting on command output from the server' say 'before sending the next command down the line.' end when translate(topic)=='REPEAT' then do say ' REPEAT' say 'Send a string to the server multiple times.' say ' /repeat NUM string' say 'Sends the string to the server NUM times just as if you typed it in' say 'that many times. Repeat does not wait for each command to end before' say 'it sends the next, it can be thought to be equivalent of making a' say 'file with the string in it NUM many times and then issuing a /quote' say 'on that file.' end when translate(topic)=='TELEGRAM' then do say ' TELEGRAM ' say 'Send a file to the server as a telegram. ' say ' /telegram country filename filetype filemode' say 'Send the file filename filetype filemode to country via a telegram. The' say 'client will break the file up at end-of-lines so that it never sends more' say 'than 512 bytes pere telegram command. I have noticed a 'bug', the client' say 'seems to send an additional blank line where it breaks the file up into' say 'chunks.' end when translate(topic)=='MACROS' then do say 'Macros:' say ' The macro language is pretty basic, you define an alias and whenever' say 'you issue the alias preceded by a slash it will send the command to the' say 'server. You may define an alias to be more than one line of commands' say 'by seperating each line with a semi-colon (;). You may also issue client' say 'commands in a macro by preceding them with a slash.' say ' eg:' say ' /alias print_pop /pipe cen * >>file pop file a;/cms print pop file a' say ' This will make an alias which will dump the census information into' say ' a file named pop file a and then it will print it out.' say ' ' say 'You may also use command line arguments in an alias by preceding the' say 'argument number by a $ in the macro it will replace the $number with' say 'that numbered argument, if that argument was not specified it will' say 'replace it with a blank. ' say ' eg:' say ' /alias mandp /pipe map $1 >> file mandp file a (e;' say ' /pipe prod $1 >> file mand file a (a ' say ' This will dump the map and the production output for whatever is' say ' defined in argument 1 of the alias. For instance, if you issued a' say ' /mandp #1 it would dump the map and production report for realm #1' say ' or /mandp -10:10,-10:10 would dump the map and production report for' say ' the area -10:10,-10:10.' end when translate(topic)=='TOOLS' then do say 'Tools: ' say " I haven't spent alot of time working on tools, but I am trying to" say 'add stuff in so that it will be easier to use them in conjunction with' say 'the client. I think that most of the basic stuff can be done with the' say '/pipe ___ >> ___ command and aliases. If you check where you got this' say 'client there should be some simple tools, if I mailed it to you I should' say 'have sent some simple stuff with it. ' end when translate(topic)=='GLOBALV' then do say 'GLOBALVs: ' say ' I added in a check for a version files which is a simple output' say 'parser that pulls information out of the version command and stores some' say 'of the values in a file, which if found it loads the values as global' say 'variables to be accessed by tools. ' end otherwise do say 'Help Topics:' say ' Requirements Background Support' say ' How_to_use Alias Announce' say ' Cms DumpHistory History' say ' Pipe Quit Quote' say ' Repeat Telegram Macros' say ' Globalv Tools' end end return