Ultramode News V1.3 - By Thrill

*Version History:
V1.3 - Added timer to prevent hammering...
V1.2 - Fixed compressed input, removed obsolete slashdot "ultramode.txt" parser.
V1.1 - minor bugfixes, added XML capability

This script parses generic Ultramode and Slashdot-XML formatted news to an IRC-channel. 
For this it needs Lynx (v2.8+ tested ; maybe earlier versions will work too) and an Eggdrop Bot (v1.6.1 tested).
Ultramode is a newsfile-format designed by Slashdot. 

*What it does? 

The script will get the ultramode.txt or slashdot.xml (<name>.xml) file from the website you configure 
(example scripts for slashdot.org and amiga.org are included) and will paste the items included therein to the channel,
colorformatted (this you can switch off). It will furthermore paste the date and url of the newsitem, so you can 
easily read the full deal (doubleclick url in mirc ;).

*Usage:

After installing the script in eggdrop.conf and configuring it (read the script for that) you can use the command 
'!ultranews <number>' or '!xmlnews <number>  to view a specific newsitem. 
For the first four (configurable) newsitems you just give !ultranews/!xmlnews (or whatever command you made from it).
Due to its usage of global variables, using two ultramode.tcl-scripts in 1 eggdrop will lead to bad results. 
Best solution is to either change ALL variable and functionnames in the second tcl-script so they do not conflict,
or run another bot which handles the second script.
Please use the "ultracompressed" and "ultragunzip" when necessary ie. when the site only provides .GZ url's.
Slashdot is an example for this. If the script doesn't seem to output anything, please change these parameters
and experiment.


*What is an ultramode-file, how do I recognize one? 

Look at this excerpt ( (c) Slashdot.org):
------------
%%
Where Does Microsoft Want You to Go Today?
http://slashdot.org/articles/01/06/07/1252227.shtml
2001-06-07 12:49:10 EDT
michael
subliminal-message-here
Microsoft
120
articles
topicms.gif
%%
AOL/Time-Warner Won't Advertise Competition
http://slashdot.org/articles/01/06/07/1142200.shtml
2001-06-07 11:43:22 EDT
michael
what-did-you-expect?
America Online
115
articles
topicaol.jpg
%%
-----------

This is http://www.slashdot.org/ultramode.txt. Every other ultramode.txt will look the same way. If unsure, try and see if
it outputs something to IRC when you change the url of the ultramode.txt-file :)
For a list of sites that support ultramode.txt (Slash code), see: http://slashcode.com/sites.shtml

*What is an Slashdot XML-file, how do I recognize one?

Look at this excerpt ( (c) Slashdot.org):
-----------
<?xml version="1.0" encoding="ISO-8859-1"?><backslash
xmlns:backslash="http://slashdot.org/backslash.dtd">

	<story>
		<title>Hackers At Large, August 10-12</title>
		<url>http://slashdot.org/article.pl?sid=01/07/11/2215234</url>
		<time>2001-07-12 07:06:14</time>
		<author>michael</author>
		<department>build-a-better-mousetrap</department>
		<topic>announce</topic>
		<comments>30</comments>
		<section>articles</section>
		<image>topicannouncements.gif</image>
	</story>
----------

This is the Slashdot-XML, every site that supports the latest version of Slashcode (Amiga.org is not one of them)
will have this file with <some name>.xml (most likely: <websitename>.xml) as filename.
For a list of sites that support <name>.xml (Slash code), see: http://slashcode.com/sites.shtml

*Disclaimer:

The author takes no responsibility whatsoever for the usage of this script. You may change and copy the script
to your own liking, but give credit where credit is due (ie do not remove my name/email ). The author takes
no responsibility whatsoever for the changes you make to this script. If it doesnt work or other problems arise,
you are on your own.

Where can the author be reached: jmildham59@hotmail.com
                                 (read the doc/script before you mail me please - if you DO mail, 
                                  state the EXACT errormessage you experience including eggdrop.log-entries)