<?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/3409" />

	<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-01-09T14:02:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-01-09T14:02:47-04:00</updated>

		<published>2003-01-09T14:02:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15092#p15092</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15092#p15092"/>
		<title type="html"><![CDATA[Web text to channel if file is different. Please help me ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15092#p15092"><![CDATA[
Yesss it's perfect!! Thanksssss a l8t!! <br>I'll credit you :pp<br><br><br>thx!!    <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by Guest — Thu Jan 09, 2003 2:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pollar]]></name></author>
		<updated>2003-01-09T13:19:27-04:00</updated>

		<published>2003-01-09T13:19:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15085#p15085</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15085#p15085"/>
		<title type="html"><![CDATA[My answer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15085#p15085"><![CDATA[
I haven't tested it, but it should work (I think  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> )<br><div class="codebox"><p>Code: </p><pre><code>package require http #  For storing old data:set tempData ""#  Update time (in minutes):set updTime 1#  Set autodisplay channel(s) [separated by spaces]:set notChans "#lamest #laamah"#  Killing existing timer (needed if rehashing or restarting):if {[timerexists updData]!=""} {    killtimer $updTimer}#  Updating data...proc updData {} {global updTimer updTime tempDataset newsfile [::http::geturl http://xxx.xxxx.xxx/xxx.txt] set data [::http::data $newsfile] if {$data!=$tempData} {  # data is new, put this data to chans:notifyChans $dataset tempData $dataputlog "Updating... New data found!"} else {putlog "Updating... New data not found!"}set updTimer [timer $updTime updData]}#  Chan notices:proc notifyChans {data} {global notChansforeach _chan $notChans {if {[botonchan $_chan]} {putquick "NOTICE $_chan :your text here..."putquick "NOTICE $_chan :your text here..."  foreach z [split $data \n] {   putquick "NOTICE $_chan :$z"   } } else {putlog "I'm not on $_chan"}}} # Also you can bind command:bind pub -|- !test performTestproc performTest {nick host hand chan text} {global tempDataif {$tempData!=""} {putquick "NOTICE $chan :last updated data..."foreach z [split $tempData \n] { putquick "NOTICE $chan :$z" } }}# Autoupdating data on start, rehash or restart:set updTimer [timer $updTime updData]</code></pre></div>Thats all. I'm sure there is a lot of bugs  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad"> , but you can fix them.... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2501">pollar</a> — Thu Jan 09, 2003 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-01-09T12:15:34-04:00</updated>

		<published>2003-01-09T12:15:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15080#p15080</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15080#p15080"/>
		<title type="html"><![CDATA[Web text to channel if file is different. Please help me ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15080#p15080"><![CDATA[
Thax a lot for the suggestions but i don't know really how to do it ;p<p>Statistics: Posted by Guest — Thu Jan 09, 2003 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-09T09:26:26-04:00</updated>

		<published>2003-01-09T09:26:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15075#p15075</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15075#p15075"/>
		<title type="html"><![CDATA[Web text to channel if file is different. Please help me ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15075#p15075"><![CDATA[
I would actualy recomend using some form of hash of the data. IE, use a MD5 hash.<br><br>This way, no matter how large the page is, you are not storing vast information, for no purpose.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 09, 2003 9:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-09T07:44:54-04:00</updated>

		<published>2003-01-09T07:44:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15071#p15071</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15071#p15071"/>
		<title type="html"><![CDATA[Web text to channel if file is different. Please help me ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15071#p15071"><![CDATA[
make a global variable containing the old data, then match it against the new data, if it's not matching set the global varaiable to the new data..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Thu Jan 09, 2003 7:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-01-09T07:11:58-04:00</updated>

		<published>2003-01-09T07:11:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15063#p15063</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15063#p15063"/>
		<title type="html"><![CDATA[Web text to channel if file is different. Please help me ;)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15063#p15063"><![CDATA[
I would like that my bot check every 1 min a web text file and if it's different as the last check it'll send a notice into the channel with text of the new one. Text in the file it's normally not more than 1 line.<br><br>Could somebody help me? What I have to add to my code?<br><br>Thxxx a l8t!!!!!<br>Prestige<br><br><div class="codebox"><p>Code: </p><pre><code>package require httpproc check_news {nick uhost hand chan text} {set dataoggi [clock format [clock seconds] -format "%d/%m/%y"]putquick "NOTICE $chan :News - Update date $tdate$tdate"putquick "NOTICE $chan :."set newsfile [::http::geturl http://xxx.xxxx.xxx/xxx.txt]set data [::http::data $newsfile]foreach z [split $data \n] {putquick "NOTICE $chan :$z"  }}</code></pre></div><p>Statistics: Posted by Guest — Thu Jan 09, 2003 7:11 am</p><hr />
]]></content>
	</entry>
	</feed>
