                     
		IceBerg V 1.10
		A REXX script for GTirc
		Written by Stephen Berg
		(C)1996 - Stephen Berg

Table of Contents

1.  Introduction

2.  Disclaimer

3.  Installation

4.  Usage

5.  Commands
    5a.  General Commands
    5b.  Shortened/enhanced versions of normal IRC commands
    5c.  Message logger commands
    5d.  Silly commands (I had to add a few of these!)
    5e.  Accessible OS/2 commands
    5f.  Split Finder commands
    5g.  Command notes

6.  Miscellaneous
    6a.  Error calling IBergMsg.cmd (-41)
    6b.  Start up commands

7.  Future Plans

8.  Credits

9.  Contacts

*******************************************************
*                1.  Introduction:                    *
*******************************************************

	Thank you for looking at IceBerg.  This script was written with two
distinct goals in mind.  To customize and enhance the GTirc Internet Relay 
Chat client and to provide me with a learning tool for REXX programming.  
It has been ideal for both purposes.

	IceBerg is a first generation product.  While I did look at other 
UNIX based IRC scripts for ideas, the bulk of the IceBerg script is my own 
creation, with two exceptions, the message logging portion was written by 
someone else who went by the nick of "Wease", I've included some info about
him in the credits section at the end of this document.  The other person 
to contribute code was "NapalmGod", who sent me the silly ASCII art.  I 
did get a couple of ideas from various people in the newsgroups and on 
IRC itself concerning the mechanics of the REXX code.  But the final code 
is mine.

	IceBerg is POSTCARD-ware.  That means it's free of charge, $0.00, 
here for the taking, up for grabs, or whatever you want to call it.  I 
do ask that if you're using it, drop me an E-Mail (Address is at the end 
of this document) and let me know what you think.

*******************************************************
*                2.  Disclaimer:                      *
*******************************************************

	(That silly legal stuff)

	OK, as I said in the Introduction section this script was written 
partly as a learning tool for me.  Which means I am in no way an expert 
in REXX.  The entire code is here for you to see, change, use or not use.  
I will *NOT* be held responsible if your machine blows up, if your 
Internet Provider disconnects you, if your wife/husband leaves you, if 
the IRS audits you or anything else bad happens to you by fault or not 
in this set of scripts.  That's why it's free.  And by using these scripts 
you fully and without reservation accept these terms.  If you don't accept, 
then don't run these scripts, it won't effect my paycheck either way.  =:-)

*******************************************************
*                3.  Installation:                    *
*******************************************************

	Well if you're reading this you've probably managed to un-zip the 
archive file.  Place at least the three main files in your GTirc 
subdirectory.  Next define the three files in the "Options" --> 
"Preferences" dialog of GTirc.  Startup Command would be 
"/run icestart.txt", "Input Message Script" would be IBergMsg.CMD and 
"Output Command Script" would be "IBergCmd.CMD".  That gets you up and 
running right away, no re-booting the machine, no re-loading GTirc, none 
of that nonsense.  You may want to issue a "/run icestart.txt" command to
set the variables in there that IceBerg uses in it's operation.  Aside
from that, once you click on the "OK" button you are ready to roll.

*******************************************************
*                     4.  Usage:                      *
*******************************************************

	Using IceBerg is simple, most of the commands are either shortened 
versions of the normal IRC commands, or command names that you may be used 
to from other IRC scripts.  I may have used a different name for a command 
from what you're used to.  Probably cause I haven't used the same scripts 
as you, =:-).  While running IceBerg you can type in "/icehelp", 
"/icehelp2" or "/msghelp" to view the help screens.  

	The "icestart.txt" file contains some commands to set up up flags
that IceBerg relys on for it's use.  Changing some of the "/iceberg ....." 
commands in this file will cause IceBerg to behave erratically, and I 
wouldn't suggest it.  You can change the default awaymsg and the size of 
your default msg buffer.  Read the GTirc help on how to use text files and 
the "/RUN" command for further info.

	First thing I would suggest that you do once you have these
scripts loaded is to start GTirc, and run "/icehelp", "/icehelp2" and 
"/msghelp".  That will display some help screens on what commands are
available, their syntax and a brief description.

*******************************************************
*                    5.  Commands:                    *
*******************************************************

<XXXX> - means a required parameter
[XXXX] - means an optional parameter

    5a.  General Commands

/icehelp				displays brief help statements for
					IceBerg commands (this is mostly 
					the functional, practical stuff)

/icehelp2				displays brief help statements for
					IceBerg commands not in /icehelp 

/msghelp				displays brief help statements for 
					the IceBerg message logging 
					functions

/iceberg <setting> [value]		query the value of or change a 
					global GTirc REXX variable

/whom <nick>				Get VERSION & USERINFO about nick

/idle <nick>				Get idle time for nick

/dw <hostname|IP address>		does a who on the hostname or IP
					address, placing an "*" at the 
					beginning and end to do a wildcard 
					who on that domain

/wall <#channel> <text>			sends a msg to every visible 
					occupant of #channel
					(** See Note 1 **)

/wallop <#channel> <text>		sends a msg to every visible 
					channel op of #channel  
					(** See Note 1 **)

/calc <string>				send a calc message to OS2Bot on
					#OS/2 (EFNet) the string will be
					evaluated for a value and the value
					will be returned.  
					(Try "/calc ssgt" or "/calc ibm")

    5b.  Shortened versions of normal IRC commands

/k [1-7] <nick>				performs a kick on nick, there are 
					seven preset joke kicks and a default 
					if none of the six are chosen.  /k 
					by itself will display a short 
					description of the six preset kicks

/j <#channel>				joins #channel

/lv [#channel]				leaves current channel or the 
					specified channel

/not <nick|#channel> <text>		notice the target nick or channel
					with text (see note 3)

/t [new topic]				sets the current channel's topic, 
					without arguments it will display 
					the topic

/wi <nick>				does a whois on nick

/ww <nick>				does a whowas on nick

/inv <nick>				invites nick to current channel

/cm [[+|-] modes]			adds or subtracts mode settings for 
					the current channel, with no 
					parameters it retrieves and 
					displays the current channels modes

/um <+|- modes>				changes your user modes


    5c.  Message logger commands

/reset					clears and resets the message 
					buffer (** See Note 2 **)

/last [num]				displays the messages in the 
					buffer, if a number is included 
					that many messages starting from 
					the last msg received will be 
					displayed

/buffer [num]				displays the max number of messages 
					to be stored, or sets it if a 
					number is included

/msgchk					displays the current number of 
					messages stored in the buffer

/gone [away message]			marks you to being away with the 
					optional away message and turns 
					message logging on.  If no away 
					message is specified the default 
					"awaymsg" in "icestart.txt" is 
					used (see "/awaymsg")

/back					turns off message logging, displays 
					the messages in the buffer as if 
					/last had been run, and unmarks 
					you as being away

/awaymsg [away message]			checks or sets the default away 
					message

/savemsgs [filename]			save the messages currently stored
					in the buffer to filename, default
					filename, "msgssave.txt" is used
					if no filename is specified


    5d.  Silly commands (I had to add a few of these!)

/crypt <text>				encrypt and send text to the 
					current channel.  Other GTirc users
					that have IceBerg will get an 
					automatic decryption of the text
					everyone else will most likely see
					junk.  (This is in *NO* way un-
					breakable code)

/revsay <text string>			reverses the text string and sends 
					it to the current channel or query

/revmsg <nick> <text string>		same as /revsay, but in a msg to 
					nick

/revme <text string>			once again, but sends it as a /me
					command to the current channel or 
					query


    5e.  Accessible OS/2 commands

/nsl <hostname|IP address>		runs an "NSLOOKUP" command on the
					hostname or IP, and returns the
					result to the GTirc window

/host <hostname|IP address>		runs a "HOST" command on the
					hostname or IP, and returns the 
					result to the GTirc window

/osping <hostname|IP address>		runs a "PING" command to the
					hostname or IP, (using two, 25 
					byte packets) and returns the 
					result to the GTirc window

/ossend <command>			runs command and sends the result
					to the current channel or query
					this does ignore any blank lines 
					when it sends the results to the
					channel  (see note 4)

/exec <command>				runs an OS/2 command and returns 
					the result to the GTirc window

    5f.  Split Finder commands

/getservers				get a listing of all currently
					present servers from your current
					server.  This does not need to be
					run each time you want to find any
					split servers, IceBerg saves this
					file and updates it when you run
					the /findsplit or /addnew command 
					(see note 5a)

/findsplit				gets a listing of all currently
					present servers, then compares
					that to "servers.lst" to find any
					split servers and displays the
					split servers in the control
					window  (see note 5b)

/addnew					find and add any servers currently
					listed in the "current.lst" file, 
					generated by /findsplit, that do 
					not appear in "servers.lst" to 
					"servers.lst" and displays those 
					new servers in the control
					window  (see note 5b)

    5g.  Command notes

(Note 1) - The /wall and /wallop commands may be used from inside or outside 
a channel.  When outside a channel it will not be able to see any users 
that have set the (+i, or invisible) mode for themselves.  Abuse of these 
commands will usually get you kicked and/or banned from channels.  Excessive 
abuse may get you K-lined from servers.

**  You've been warned, so don't blame me when you get banned from a  **
**  channel or K-lined from a server.                                 **

(Note 2) - Each time you start GTirc, you need to do /reset, to prime the 
message logging system.  It is not, however, a good idea to do this from 
within the Startup Command file (IceStart.txt), since that gets run each 
time you connect to a server.  Because if while in the middle of a session 
you change servers, any msgs in the buffer would be lost.  I am trying to 
figure out how to fix this, and hope to have it fixed in the next version.  

(Note 3) - The /NOT command is not a short version of /NOTIFY.  This is
just a version of the /notice command.  The /NOTICE command is not supported 
in GTirc at this time.  Incoming notices from other users are handled as 
private messages.  I have tried to fix this, but it tends to mess up other 
functions in GTirc, so I left it alone.

(Note 4) - This can generate quite a bit of text to be sent to the channel 
or query one line at a time depending on the command you are issuing.  It 
can cause you to be kicked from channels, and possibly disconnected from 
your server due to excess flooding being detected.  If you're unsure how 
much data is going to be returned, run the command using the "/exec" 
command first since that displays the result only to you.

(Note 5a) - Only run "/getservers" if your "servers.lst" has become 
corrupted or lost.  I have included the "servers.lst" that I have with the 
IceBerg distribution.  If you're running this on UnderNet it won't be of 
much help to you, since it lists EFNet servers.  I'm currently thinking 
about how to support multiple nets with this function.  

(Note 5b) - Running "/findsplit" will show you any servers in "servers.lst" 
that do not appear on the net at that time.  It will then run "/addnew" 
which will find any new servers that do not appear in "servers.lst", it 
will display the servers name and add it to the "servers.lst" file.

    5h.  Other Commands/Features

Auto-Op:  By setting the Auto-Op feature using "/iceberg autoop on", you
will enable the Auto-Op feature in IceBerg.  Auto-Op uses the file,
"autoop.lst" as a list of people you wish to automatically give ops to in 
particular channels.  Each line in this file represents one user and one 
channel.  (An example is included with IceBerg.)  I am planning on figuring
out how to allow wildcards in the "autoop.lst" file, but haven't starting
on that yet.  Maybe for the next version.

*******************************************************
*                  6.  Miscellaneous                  *
*******************************************************

    6a.  Error calling IBergMsg.cmd (-41)

	If you get the following error: "Error calling IBergMsg.cmd (-41)" 
in the Control Window, that is possibly caused by turning on the message
logging feature without doing an initial "/reset".  Run the "/reset" command,
keeping in mind that if any messages are stored in the message logger they
will be lost, and then try the same recently used commands again to see if 
the "-41" error re-occurs.  If it does, let me know what commands you were 
trying to use, the events around that time, and the error so I can try to 
fix it.

    6b.  Start up commands

	I'm working on a scheme to set up an initial set of start up 
commands instead of using the "icestart.txt" file.  This is due to the fact
that GTirc runs any defined Startup Command any time you connect to a
server, instead of just at the initial program start.

*******************************************************
*                   7.  Future Plans:                 *
*******************************************************

	I have a few more ideas that I need some time to work out the REXX
code for that I plan to add into IceBerg.  I have heard that there is a 
planned release sometime around spring 96 of GTirc V2.00.  From what I have
heard (take that with a grain of salt) that there will be some changes
that may effect how the REXX scripts need to be written.  Hopefully it'll
be simple changes that I can implement easily.

	If you have any ideas that you would like to see implemented in 
IceBerg send me an E-mail and I'll definitely look into it.

*******************************************************
*                     8.  Credits:                    *
*******************************************************

Message logger - 
	Greg Spath  (Wease on the IRC)
	gspath@epix.net

	his web page is:
	http://www.epix.net/~gspath

ASCII Art and idea for the kicks -
	(Napalmgod on the IRC)

General Ideas and his constant bugging me to get it done -
	Profx on IRC in #os/2 (author of Intercom for OS/2)
		http://revsoft2.is.net/ic/intercom.html

General REXX advice -
	RajV on IRC in #os/2
	Topham on IRC in #os/2
	Lots of others on IRC
	Quite a few people on Usenet in comp.lang.rexx
	Quite a few people on various REXX mailing lists

                *******************************
                *   !! THANKS TO YOU ALL !!   *
                *******************************

*******************************************************
*                  9.  Contacts                       *
*******************************************************

	I can be found on IRC usually on EFNet using "SSgt" as a nick.  
For E-Mail, sberg@southwind.com works.

	If you have suggestions *please* E-Mail them to me, that way I can 
keep an archive on what suggestions I've looked at/worked on/added in, and 
I can also keep track of who suggested what.

