<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/3594" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-04-27T07:52:49-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/3594</id>

		<entry>
		<author><name><![CDATA[MC_8]]></name></author>
		<updated>2003-04-27T07:52:49-04:00</updated>

		<published>2003-04-27T07:52:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19507#p19507</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19507#p19507"/>
		<title type="html"><![CDATA[Errorhandling using the http package]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19507#p19507"><![CDATA[
I see it handling errors within your code... what's the question again?<br>As far as catching TCL errors, use <strong class="text-strong">catch</strong>  -&gt; <a href="http://tcl.activestate.com/man/tcl8.3/TclCmd/catch.htm" class="postlink">http://tcl.activestate.com/man/tcl8.3/TclCmd/catch.htm</a>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3080">MC_8</a> — Sun Apr 27, 2003 7:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ProXy]]></name></author>
		<updated>2003-02-04T09:09:34-04:00</updated>

		<published>2003-02-04T09:09:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16144#p16144</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16144#p16144"/>
		<title type="html"><![CDATA[Errorhandling using the http package]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16144#p16144"><![CDATA[
Hi there,<br><br>I wrote a little script that reads the info about a stream from a website. It works fine, but I would like to add some errorhandling. Maybe the Site is down, my eggdrop only writes some error messages to the partyline. Maybe anyone could help me to do this?<br><br>Here`s the source so far:<div class="codebox"><p>Code: </p><pre><code>############ Configuration #############set streamurl "http://rootbash.com:25000"########################################bind pub *|* "!listeners" pub:listenerspackage require httpproc pub:listeners {nick host handle channel arg} {global streamurlset streamsource [http::geturl $streamurl]upvar #0 $streamsource streaminfoif {[lindex $streaminfo(http) 2] != "OK"} {putserv "PRIVMSG $channel :Sorry, an error occured!"} else {set streamdata [http::data $streamsource]set streamkbps "0"regexp {^.*Stream Status: &lt;/font&gt;&lt;/td&gt;&lt;td&gt;&lt;font class=default&gt;&lt;b&gt;Stream is up at (.*) kbps with &lt;B&gt;(.*) of (.*) listeners \((.*) unique\).*} $streamdata streamdata streamkbps streamlisteners streammaxlisteners streamuniquelistenersif {$streamkbps == "0"} {putserv "PRIVMSG $channel :Sorry, the stream is currently offline!"} else {putserv "PRIVMSG $channel :The stream is online at $streamkbps kbps with $streamlisteners/$streammaxlisteners listeners. ($streamuniquelisteners unique)"}}}putlog "LOADED: Stream v0.1"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1729">ProXy</a> — Tue Feb 04, 2003 9:09 am</p><hr />
]]></content>
	</entry>
	</feed>
