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

	<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>2006-06-25T14:33:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[pakistani1]]></name></author>
		<updated>2006-06-25T14:33:03-04:00</updated>

		<published>2006-06-25T14:33:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64314#p64314</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64314#p64314"/>
		<title type="html"><![CDATA[WC results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64314#p64314"><![CDATA[
thanx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6119">pakistani1</a> — Sun Jun 25, 2006 2:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CuteBangla]]></name></author>
		<updated>2006-06-25T14:29:22-04:00</updated>

		<published>2006-06-25T14:29:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64313#p64313</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64313#p64313"/>
		<title type="html"><![CDATA[WC results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64313#p64313"><![CDATA[
&amp; here goes the last Topics link where it was discussed<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=11505" class="postlink"><strong class="text-strong">Topic: Cricket Live Scores</strong></a><br><br><blockquote class="uncited"><div>CuteBangla <br>can u plz share ur tcl that u use for the cricket scores .. <br>thanx</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7425">CuteBangla</a> — Sun Jun 25, 2006 2:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CuteBangla]]></name></author>
		<updated>2006-06-25T14:25:15-04:00</updated>

		<published>2006-06-25T14:25:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64312#p64312</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64312#p64312"/>
		<title type="html"><![CDATA[Score]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64312#p64312"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval ::rss-synd {variable rssset rss(cricinfo){ "url""http://www.cricinfo.com/rss/livescores.xml" "channels""#BanglaCricket #Bangladesh" "database""/home/cutebd/eggdrop/cricinfo.db" "output""4[3Cricket ScoreBoard4]5 @@item!title@@" "trigger""!score"}# The next 3 are advanced examples. They demonstrate how to use the#   the 'eval-tcl' option.# The default settings, If any setting isnt set for an individual feed it'll#   use the default listed hereset default{ "max-output"10 "remove-empty"0 "max-depth"5 "eval-tcl"0 "update"1 "timeout"60000 "channels""#BanglaCricket #Bangladesh" "trigger""!score @@feedid@@" "output""\4[3@@channel!title@@4]5 @@item!title@@" "useragent""Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6"}}## End of Settings################################################################################proc ::rss-synd::init {args} {variable rssvariable defaultpackage require httpforeach feed [array names rss] {array set tmp $defaultarray set tmp $rss($feed)set required [list "max-depth" "update" "timeout" "channels" "output" "useragent" "url" "database"]foreach {key value} [array get tmp] {if {[set ptr [lsearch -exact $required $key]] &gt;= 0} {set required [lreplace $required $ptr $ptr]}}regsub -nocase -all -- {@@feedid@@} $tmp(trigger) $feed tmp(trigger)if {[llength $required] == 0} {if {([file exists $tmp(database)]) &amp;&amp; ([set mtime [file mtime $tmp(database)]] &lt; [unixtime])} {set tmp(updated) [file mtime $tmp(database)]} else {set tmp(updated) 0}set rss($feed) [array get tmp]} else {putlog "\002RSS Error\002: Unable to load feed "$feed", missing one or more required settings. "[join $required ", "]""unset rss($feed)}unset tmp}bind evnt -|- prerehash [namespace current]::deInitbind time -|- {* * * * *} [namespace current]::getFeedsbind pubm -|- {* *} [namespace current]::pubFeedsputlog "\002RSS Syndication Script\002: Loaded."}proc ::rss-synd::deInit {args} {catch {unbind evnt -|- prerehash [namespace current]::deInit}catch {unbind time -|- {* * * * *} [namespace current]::getFeeds}catch {unbind pubm -|- {* *} [namespace current]::pubFeeds}namespace delete [namespace current]}proc ::rss-synd::getFeeds {args} {variable rssset i 0foreach name [array names rss] {if {$i == 3} { break }array set feed $rss($name)if {$feed(updated) &lt;= [expr { [unixtime] - ($feed(update) * 60) }]} {::http::config -useragent $feed(useragent)catch {::http::geturl "$feed(url)" -command "[namespace current]::processFeed {[array get feed] depth 0}" -timeout $feed(timeout)}set feed(updated) [unixtime]set rss($name) [array get feed]incr i}unset feed}}proc ::rss-synd::pubFeeds {nick user handle chan text} {variable rssforeach name [array names rss] {array set feed $rss($name)if {[string match -nocase $text $feed(trigger)]} {if {[[namespace current]::channelCheck $feed(channels) $chan]} {set feed(channels) $chanset data ""if {[catch {open $feed(database) "r"} fp] == 0} {while {![eof $fp]} {gets $fp lineappend data $line}close $fp[namespace current]::outputFeed [array get feed] $data} else { putserv "PRIVMSG $chan :\002RSS Warning\002: [string totitle $fp]." }}}}}proc ::rss-synd::processFeed {feedlist args} {set token [lindex $args end]array set feed $feedlistupvar 0 $token stateif {![string match -nocase $state(status) "ok"]} {putlog "\002RSS Error\002: $state(url) (State: $state(status))"return 1}if {([::http::ncode $token] == 302) || ([::http::ncode $token] == 301)} {set feed(depth) [expr {$feed(depth) + 1 }]array set meta $state(meta)if {$feed(depth) &lt; $feed(max-depth)} {catch {::http::geturl "$meta(Location)" -command "[namespace current]::processFeed {[array get feed]}" -timeout $feed(timeout)}} else {putlog "\002RSS Error\002: $state(url) (State: timeout, max refer limit reached)"}return 1} elseif {[::http::ncode $token] != 200} {putlog "\002RSS Error\002: $state(url) ($state(http))"return 1}if {[set newsdata [[namespace current]::createList [::http::data $token]]] == ""} {putlog "\002RSS Error\002: Unable to parse URL properly. "$state(url)""return 1}::http::cleanup $tokenset oldfeed ""if {[catch {open $feed(database) "r"} fp] == 0} {while {![eof $fp]} {gets $fp lineappend oldfeed $line}close $fp} else { putlog "\002RSS Warning\002: [string totitle $fp]." }# reconstruct the data list into a format thats standard and usable with cookies## note:#   this code is pretty nasty, the hack to make attributes work with bottom level#   tags could probably be improved on. should probably clean this up for v0.3.foreach {tag value} $newsdata {# rss v0.9x &amp; v2.0 'item' tags are within the 'channel' tag. we need to seperate them.if {[string match -nocase $tag "rss"]} {foreach {subtag subvalue} $value {if {[string match -nocase $subtag "=channel"]} {set tmp $subvalue} elseif {[string match -nocase $subtag "channel"]} {foreach {ssubtag ssubvalue} $subvalue {if {[string match -nocase $ssubtag "=item"]} {set ttmp [list $ssubtag $ssubvalue]continue} elseif {[string match -nocase $ssubtag "item"]} {if {![info exists ttmp]} {lappend news(item) [list "item" $ssubvalue]} else {lappend news(item) [list "item" $ssubvalue [lindex $ttmp 0] [lindex $ttmp 1]]unset ttmp}} else {lappend news(channel) $ssubtag $ssubvalue}}if {[info exists news(channel)]} {if {![info exists tmp]} {set news(channel) [list [list "channel" $news(channel)]]} else {set news(channel) [list [list "channel" $news(channel) "=channel" $tmp]]unset tmp}}}}break# rss v1.0 'item' tags are outside of the 'channel' tag, just remove excess garbage.} elseif {[string match -nocase $tag "rdf:RDF"]} {foreach {subtag subvalue} $value {if {[string match {=*} $subtag]} {set tmp [list $subtag $subvalue]continue}if {![info exists tmp]} {lappend news($subtag) [list $subtag $subvalue]} else {lappend news($subtag) [list $subtag $subvalue [lindex $tmp 0] [lindex $tmp 1]]unset tmp}}break}}if {[catch {open $feed(database) "w+"} fp] == 0} {puts $fp [array get news]close $fp} else {putlog "\002RSS Error\002: [string totitle $fp]."return 1}[namespace current]::outputFeed [array get feed] [array get news] $oldfeedreturn 0}proc ::rss-synd::createList {data} {set i 0set news [list]set length [string length $data]for {set ptr 1} {$ptr &lt;= $length} {incr ptr} {set section [string range $data $i $ptr]# split up the tag dataif {[llength [set match [regexp -inline -- {&lt;(.[^ \n\r&gt;]+)(?: |\n|\r\n|\r|)(.[^&gt;]+|)&gt;} $section]]] &gt; 0} {set i [expr { $ptr + 1 } ]set tag [lindex $match 1]# check to see if the tag is being closedif {([info exists current(tag)]) &amp;&amp; ([string match -nocase $current(tag) [string map { "/" "" } $tag]])} {set subdata [string range $data $current(pos) [expr { $ptr - ([string length $tag] + 2) } ]]# remove all CDATA garbageif {[set cdata [lindex [regexp -inline -nocase -- {^(?:\s*)&lt;!\[CDATA\[(.[^\]&gt;]*)\]\]&gt;} $subdata] 1]] != ""} {set subdata $cdata}# recurse the data within the currently open tagset result [[namespace current]::createList $subdata]# set the attribute data, this is set before the actual data to make reconstructing it later much easier.if {[info exists current(tmp)]} { lappend news "=$current(tag)" $current(tmp) }# set the list data returned from the recursion we just performedif {[llength $result] &gt; 0} {lappend news $current(tag) $result# set the current data we have because were already at the end of a branch#   (ie: the recursion didnt return any data)} else {regsub -nocase -all -- "\\s{2,}" $subdata " " subdatalappend news $current(tag) [string trim $subdata]}unset current# check to see if the tag is being opened} elseif {(![string match {[!\?]*} $tag]) &amp;&amp; (![info exists current(tag)])} {set tmp [list]# get all of the tags attributesif {[lindex $match 2] != ""} {set values [regexp -inline -all -- {(?:\s*)(.[^=]+)="(.[^"]+)"} [lindex $match 2]]foreach {regmatch regtag regval} $values {lappend tmp $regtag $regval}}# append attributes for self closing tagsif {([regexp {/(\s*)$} [lindex $match 2]]) &amp;&amp; ([llength $tmp] &gt; 0)} {lappend news "=$tag" $tmp# set the current open tag and its attributes} else {set current(tag) [string map { "\r" "" "\n" "" "\t" "" } $tag]if {[llength $tmp] &gt; 0} { set current(tmp) $tmp }set current(pos) $i}unset tmp}}}return $news}proc ::rss-synd::outputFeed {feedlist newslist {oldfeed ""}} {array set feed $feedlistarray set news $newslistif {$oldfeed != ""} {array set ttmp $oldfeedarray set old [lindex $ttmp(item) 0]unset ttmparray set last $old(item)}set i 0foreach itemlist $news(item) {array set ttmp $itemlistarray set tmp $ttmp(item)unset ttmpif {([info exists feed(max-output)]) &amp;&amp; ($i == $feed(max-output))} { break }if {([info exists last(title)]) &amp;&amp; ([string compare $last(title) $tmp(title)] == 0)} { break }if {([info exists last(link)]) &amp;&amp; ([string compare $last(link) $tmp(link)] == 0)} { break }set msg [[namespace current]::formatOutput $feedlist "[lindex [set news(channel)] 0] [set itemlist]"]foreach chan $feed(channels) {if {[botonchan $chan]} {putserv "PRIVMSG $chan :$msg"}}incr i}}proc ::rss-synd::formatOutput {feedlist item} {array set feed $feedlistset output $feed(output)set eval 0if {([info exists feed(eval-tcl)]) &amp;&amp; ($feed(eval-tcl) == 1)} { set eval 1 }set data [regexp -inline -nocase -all -- {@@(.*?)@@} $output]foreach {match cookie} $data {if {[set tmp [[namespace current]::replaceCookies [split $cookie "!"] $item]] != ""} {regsub -nocase -- "@@$cookie@@" $output "[string map { "&amp;" "\\\x26" } [[namespace current]::decodeHtml $eval $tmp]]" output}}if {(![info exists feed(remove-empty)]) || ($feed(remove-empty) == 1)} {regsub -nocase -all -- "@@.*?@@" $output "" output}if {$eval == 1} {if {[catch {set output [subst $output]} error] != 0} {putlog "\002RSS Error\002: $error"}}return $output}proc ::rss-synd::replaceCookies {cookie data} {foreach {key value} $data {if {([llength $cookie] &gt; 1) &amp;&amp; ([string compare -nocase [lindex $cookie 0] $key] == 0)} {return [[namespace current]::replaceCookies [lreplace $cookie 0 0] $value]} elseif {([llength $cookie] == 1) &amp;&amp; ([string compare -nocase $cookie $key] == 0)} {return $value}}}proc ::rss-synd::decodeHtml {eval data} {array set chars { nbsp\x20 amp\x26 quot\x22 lt\x3C gt\x3E iexcl\xA1 cent\xA2 pound\xA3 curren\xA4 yen\xA5 brvbar\xA6 brkbar\xA6 sect\xA7 uml\xA8 die\xA8 copy\xA9 ordf\xAA laquo\xAB not\xAC shy\xAD reg\xAE hibar\xAF macr\xAF deg\xB0 plusmn\xB1 sup2\xB2 sup3\xB3 acute\xB4 micro\xB5 para\xB6 middot\xB7 cedil\xB8 sup1\xB9 ordm\xBA raquo\xBB frac14\xBC frac12\xBD frac34\xBE iquest\xBF Agrave\xC0 Aacute\xC1 Acirc\xC2 Atilde\xC3 Auml\xC4 Aring\xC5 AElig\xC6 Ccedil\xC7 Egrave\xC8 Eacute\xC9 Ecirc\xCA Euml\xCB Igrave\xCC Iacute\xCD Icirc\xCE Iuml\xCF ETH\xD0 Dstrok\xD0 Ntilde\xD1 Ograve\xD2 Oacute\xD3 Ocirc\xD4 Otilde\xD5 Ouml\xD6 times\xD7 Oslash\xD8 Ugrave\xD9 Uacute\xDA Ucirc\xDB Uuml\xDC Yacute\xDD THORN\xDE szlig\xDF agrave\xE0 aacute\xE1 acirc\xE2 atilde\xE3 auml\xE4 aring\xE5 aelig\xE6 ccedil\xE7 egrave\xE8 eacute\xE9 ecirc\xEA euml\xEB igrave\xEC iacute\xED icirc\xEE iuml\xEF eth\xF0 ntilde\xF1 ograve\xF2 oacute\xF3 ocirc\xF4 otilde\xF5 ouml\xF6 divide\xF7 oslash\xF8 ugrave\xF9 uacute\xFA ucirc\xFB uuml\xFC yacute\xFD thorn\xFE yuml\xFF ensp\x20 emsp\x20 thinsp\x20 zwnj\x20 zwj\x20 lrm\x20 rlm\x20 euro\x80 sbquo\x82 bdquo\x84 hellip\x85 dagger\x86 Dagger\x87 circ\x88 permil\x89 Scaron\x8A lsaquo\x8B OElig\x8C oelig\x8D lsquo\x91 rsquo\x92 ldquo\x93 rdquo\x94 ndash\x96 mdash\x97 tilde\x98 scaron\x9A rsaquo\x9B Yuml\x9F apos\x27}regsub -all -- {&lt;(.[^&gt;]*)&gt;} $data "" dataif {$eval != 1} {regsub -all -- {(["\$\[\]\{\}\(\)\\])} $data {\\\1} data} else {regsub -all -- {(["\$\[\]\{\}\(\)\\])} $data {\\\\\\\1} data}regsub -all -- {&amp;#([0-9][0-9]?[0-9]?);?} $data {[format %c [scan \1 %d]]} dataregsub -all -- {&amp;([0-9a-zA-Z#]*);} $data {[if {[catch {set tmp $chars(\1)} char] == 0} { set tmp }]} dataregsub -all -nocase -- {&amp;([0-9a-zA-Z#]*);} $data {[if {[catch {set tmp [string tolower $chars(\1)]} char] == 0} { set tmp }]} datareturn [subst $data]}proc ::rss-synd::channelCheck {chanlist chan} {foreach match [split $chanlist] {if {[string match -nocase $match $chan]} { return 1 }}return 0}::rss-synd::init</code></pre></div><blockquote class="uncited"><div>CuteBangla <br>can u plz share ur tcl that u use for the cricket scores .. <br>thanx</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7425">CuteBangla</a> — Sun Jun 25, 2006 2:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pakistani1]]></name></author>
		<updated>2006-06-25T13:23:23-04:00</updated>

		<published>2006-06-25T13:23:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64311#p64311</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64311#p64311"/>
		<title type="html"><![CDATA[WC results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64311#p64311"><![CDATA[
CuteBangla <br>can u plz share ur tcl that u use for the cricket scores .. <br>thanx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6119">pakistani1</a> — Sun Jun 25, 2006 1:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CuteBangla]]></name></author>
		<updated>2006-06-11T20:38:56-04:00</updated>

		<published>2006-06-11T20:38:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63911#p63911</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63911#p63911"/>
		<title type="html"><![CDATA[WC results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63911#p63911"><![CDATA[
well mayb rss is the best solution for score &amp; i use it fot cricket score<br>its work like ...<br><br><blockquote class="uncited"><div>&lt;SuMiT&gt; !cricket<br>&lt;CuteBangla&gt; [Cricket ScoreBoard] West Indies 65/3* Vs India 588/8d (Gros Islet)</div></blockquote>but i faild to find out any rss feed of football worldcup !!<br><br>do u have any football worldcup scores rss feed??<br><blockquote class="uncited"><div>nah, i was hopping someone had a livescore.tcl script that gives the WC results, the one i found on google doesnt have WC results</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7425">CuteBangla</a> — Sun Jun 11, 2006 8:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2006-06-11T17:42:28-04:00</updated>

		<published>2006-06-11T17:42:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63907#p63907</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63907#p63907"/>
		<title type="html"><![CDATA[WC results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63907#p63907"><![CDATA[
nah, i was hopping someone had a livescore.tcl script that gives the WC results, the one i found on google doesnt have WC results<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Sun Jun 11, 2006 5:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CuteBangla]]></name></author>
		<updated>2006-06-11T01:20:27-04:00</updated>

		<published>2006-06-11T01:20:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63891#p63891</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63891#p63891"/>
		<title type="html"><![CDATA[Re: WC results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63891#p63891"><![CDATA[
well i am also trying to have World Cup 2006 result but i faild to get any rss link of world cup score<br>do you have any??<br>&amp; .pt try with any rss script<br>that will b best to get score board <br><br><blockquote class="uncited"><div>anyone can make or know a script that will give the world cup results?</div></blockquote><a href="irc://irc.cutebangla.com" class="postlink"><strong class="text-strong">iRC.CuteBangla.Com</strong></a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7425">CuteBangla</a> — Sun Jun 11, 2006 1:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2006-06-10T12:34:52-04:00</updated>

		<published>2006-06-10T12:34:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63877#p63877</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63877#p63877"/>
		<title type="html"><![CDATA[WC results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63877#p63877"><![CDATA[
anyone can make or know a script that will give the world cup results?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Sat Jun 10, 2006 12:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
