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

	<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>2004-06-24T19:08:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2004-06-24T19:08:50-04:00</updated>

		<published>2004-06-24T19:08:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37823#p37823</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37823#p37823"/>
		<title type="html"><![CDATA[Sharing Weather ,Tv and Google script.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37823#p37823"><![CDATA[
Post in the proper forum next time?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Thu Jun 24, 2004 7:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[t3ch^]]></name></author>
		<updated>2004-06-24T14:09:37-04:00</updated>

		<published>2004-06-24T14:09:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37810#p37810</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37810#p37810"/>
		<title type="html"><![CDATA[Sharing Weather ,Tv and Google script.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37810#p37810"><![CDATA[
Ok heres 3 of my scripts. pls help me improve them.<br><br>Google<div class="codebox"><p>Code: </p><pre><code>bind pub - !google web:googleproc web:google {nick host handle chan arg} {set text ""set text2 ""set data ""set data2 ""set arg [string map {" " "+"} $arg]package require httphttp::config -useragent "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8"set data [string map {"&lt;b&gt;" "" "&lt;/b&gt;" ""} [http::data [http::geturl http://www.google.se/search?q=$arg]]]regexp -nocase {&lt;!--m--&gt;&lt;a href=([\x00-\x3B\x3D\x3F-\xFF]*)&gt;([\x00-\x3B\x3D\x3F-\xFF]*)&lt;} $data data text text2puthelp "PRIVMSG $chan :\002Result:\002 \037$text\037 - $text2"}</code></pre></div>Weather<div class="codebox"><p>Code: </p><pre><code>## WE NEED HTTPpackage require httpbind pub - !weather www:weatherproc www:weather {nick host handle chan text} {## &lt;SETTINGS&gt;# how do we output?## msg $chan = 1# privmsg $nick = 2# notice $nick = 3 ## default = 3set how 1## &lt;/SETTINGS&gt;## Dont edit below here!!!## &lt;CODE&gt;if {$how == 1} {set output "PRIVMSG $chan"} elseif {$how == 2} {set output "PRIVMSG $nick"} elseif {$how == 3} {set output "NOTICE $nick"}if {$text == ""} {puthelp "NOTICE $nick :!weather &lt;country&gt;||&lt;town&gt;"}set data [http::data [http::geturl http://uk.search.weather.yahoo.com/search/weather_ukie?p=$text]]if {![regexp {&lt;a href="http://uk.weather.yahoo.com/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/index_c.html"&gt;} $data data match match2]} { puthelp "$output :\002Sorry, i cant find:\002 \037$text\037 - try here: http://uk.search.weather.yahoo.com/search/weather_ukie?p="return 0}set data [http::data [http::geturl http://uk.weather.yahoo.com/$match/$match2/index_c.html]]regexp {^.*&lt;font size=\+2 face=Arial&gt;&lt;b&gt;([-+0-9]*)°&lt;/b&gt;&lt;/font&gt;.*} $data data2 tempregexp {&lt;a href="/"&gt;Weather&lt;/a&gt; &gt; &lt;a href="/(.*)/index.html"&gt;(.*)&lt;/a&gt; &gt; (.*)&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;&lt;td align=right&gt;} $data data2 [censored] country townregexp {^.*&lt;td rowspan=2 align=center valign=middle bgcolor=#eeeeee height=100%&gt; &lt;img src=http://eur.i1.yimg.com/us.yimg.com/i/us/we/intl/([0-9]*).gif width=52 height=52 alt="([a-zA-Z ]*)"&gt;&lt;br&gt;&lt;br&gt;.*} $data data2 a conditionputhelp "$output :\002Weather for: $country / $town:\002 $condition ($temp C)"## &lt;/CODE&gt;}</code></pre></div>TV (swedish only)<br><div class="codebox"><p>Code: </p><pre><code># We need http package#package req httpbind pub - !tv info:tvproc info:tv {nick host handle chan text} {set url "http://tvprogram.nu/cgi-tvprogram/pp1.cgi?NU-palmpilot.htm"set data [http::data [http::geturl $url]]if {![regexp -nocase {&lt;b&gt;SVT1&lt;/b&gt;(.*?)&lt;b&gt;([0-9\.]+) ([\x00-\xFF]*)&lt;/b&gt;} $data data2 ok time1 tv1]} {set tv1 "?"; set time1 "?"}if {![regexp -nocase {&lt;b&gt;SVT2&lt;/b&gt;(.*?)&lt;b&gt;([0-9\.]+) ([\x00-\xFF]*)&lt;/b&gt;} $data data2 ok time2 tv2]} {set tv2 "?"; set time2 "?"}if {![regexp -nocase {&lt;b&gt;TV3 SVERIGE&lt;/b&gt;(.*?)&lt;b&gt;([0-9\.]+) ([\x00-\xFF]*)&lt;/b&gt;} $data data2 ok time3 tv3]} {set tv3 "?"; set time3 "?"}if {![regexp -nocase {&lt;b&gt;TV4&lt;/b&gt;(.*?)&lt;b&gt;([0-9\.]+) ([\x00-\xFF]*)&lt;/b&gt;} $data data2 ok time4 tv4]} {set tv4 "?"; set time4 "?"}if {![regexp -nocase {&lt;b&gt;TV4\+&lt;/b&gt;(.*?)&lt;b&gt;([0-9\.]+) ([\x00-\xFF]*)&lt;/b&gt;} $data data2 ok time5 tv5]} {set tv5 "?"; set time5 "?"}if {![regexp -nocase {&lt;b&gt;KANAL5&lt;/b&gt;(.*?)&lt;b&gt;([0-9\.]+) ([\x00-\xFF]*)&lt;/b&gt;} $data data2 ok time6 tv6]} {set tv6 "?"; set time6 "?"}if {![regexp -nocase {&lt;b&gt;ZTV&lt;/b&gt;(.*?)&lt;b&gt;([0-9\.]+) ([\x00-\xFF]*)&lt;/b&gt;} $data data2 ok time7 tv7]} {set tv7 "?"; set time7 "?"}set svt1 [lindex [split $tv1 \n] 0]set svt2 [lindex [split $tv2 \n] 0]set tv3 [lindex [split $tv3 \n] 0]set tv4 [lindex [split $tv4 \n] 0]set tv42 [lindex [split $tv5 \n] 0]set kanal5 [lindex [split $tv6 \n] 0]set ztv [lindex [split $tv7 \n] 0]puthelp "PRIVMSG $chan :\002SVT1:\002 \[${time1}\] $svt1 \002SVT2:\002 \[${time2}\] $svt2 \002TV3:\002 \[${time3}\] $tv3"puthelp "PRIVMSG $chan :\002TV4:\002 \[${time4}\] $tv4 \002TV4+:\002 \[${time5}\] $tv42 \002KANAL5:\002 \[${time6}\] $kanal5 \002ZTV:\002 \[${time7}\] $ztv" } </code></pre></div>//<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4315">t3ch^</a> — Thu Jun 24, 2004 2:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
