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

	<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>2005-08-15T13:53:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[TeRRaNoVA]]></name></author>
		<updated>2005-08-15T13:53:57-04:00</updated>

		<published>2005-08-15T13:53:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54293#p54293</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54293#p54293"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54293#p54293"><![CDATA[
have a small question,<br><br>first all script works fine, bud only when thers no key on channel<br>its will msg the #channel.  bud when there a key on it,<br>then i get a error: tcl script [:::rss::public::] ..."stripcode" <br><br>how do i get it to work when channel is #abcnews +key?<br><div class="codebox"><p>Code: </p><pre><code>allready trided &gt;&gt; CHANNELS=#abcnews (KEY)</code></pre></div>bud that doesnt work. anyone can help me with that?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6237">TeRRaNoVA</a> — Mon Aug 15, 2005 1:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-07T11:47:30-04:00</updated>

		<published>2005-08-07T11:47:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53809#p53809</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53809#p53809"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53809#p53809"><![CDATA[
well it's about time someone to come up with a decent RSS news script (or I should get mine to work in a way that's not dependent on TclLib/TclXML, people seem to be unable to install those packages, *sigh*)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Aug 07, 2005 11:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-08-07T11:37:14-04:00</updated>

		<published>2005-08-07T11:37:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53806#p53806</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53806#p53806"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53806#p53806"><![CDATA[
I am having trouble with this too <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":-(" title="Sad"> doesn't seem to be posting the most up-to-date RSS feeds.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Sun Aug 07, 2005 11:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-06T13:07:57-04:00</updated>

		<published>2005-07-06T13:07:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51882#p51882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51882#p51882"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51882#p51882"><![CDATA[
Thanks demond for the usefull answer. I found some documentation that explained 'TIME', but still needed a solution to make it update every 3'rd minute. You supplied that info, thanks.. <br><br>I'll take a look at that other script you postet. I certantly don't like the one I'm using being called cheap and ugly. It works great though, but maybe the other will work better.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Wed Jul 06, 2005 1:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-05T19:11:43-04:00</updated>

		<published>2005-07-05T19:11:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51834#p51834</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51834#p51834"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51834#p51834"><![CDATA[
"?0" means every number of minutes that ends with zero (i.e. every 10 mins); and no, you can't set it up on every 3 minutes this way<br><br>patch this:<div class="codebox"><p>Code: </p><pre><code>proc rss::check {min hour day mon year} {  if {$min % 3} return  ...</code></pre></div>BTW, this script doesn't seem RSS-compliant to me (it might work on some sites and on others it might not), it looks more like a cheap &amp; ugly hack; if you need real, 100% RSS-compliant &amp; compatible script (with configurable refresh interval), see <a href="http://forum.egghelp.org/viewtopic.php?t=9825" class="postlink">this thread</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Jul 05, 2005 7:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-05T18:28:37-04:00</updated>

		<published>2005-07-05T18:28:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51828#p51828</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51828#p51828"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51828#p51828"><![CDATA[
Thanks for the reply.<br><br>Well, I'm not what you would call skilled at coding tcl, I only know a few basics.. I did find that bind, and I allso tried modify it, bur it didn't give me any results? Maybe because I'm not doing it right?<br><div class="codebox"><p>Code: </p><pre><code>bind TIME -|- {?0 * * * *} [namespace current]::check</code></pre></div>?0 = Seconds <br>other *'s = hour, day, month, year ?? Right?<br><br>But what is '?0' ?? Is it equal 10? What does the questionmark represent? And would changing this to ...<br><div class="codebox"><p>Code: </p><pre><code>bind TIME -|- {3 * * * *} [namespace current]::check</code></pre></div>... make the script update every 3'rd minute? Because I tried that, without result. Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Tue Jul 05, 2005 6:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-07-05T16:13:13-04:00</updated>

		<published>2005-07-05T16:13:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51819#p51819</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51819#p51819"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51819#p51819"><![CDATA[
Modify this bind to your needs then<br><div class="codebox"><p>Code: </p><pre><code>  bind TIME -|- {?0 * * * *} [namespace current]::check </code></pre></div>Although i think had you actually looked at the code you might have seen that?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Tue Jul 05, 2005 4:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-05T14:02:29-04:00</updated>

		<published>2005-07-05T14:02:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51815#p51815</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51815#p51815"/>
		<title type="html"><![CDATA[rssnews.tcl - How to change update interval?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51815#p51815"><![CDATA[
So I've tried to reach perpleXa, the scripts author, on Qnet, without success, and asked the users on #perpleXa for some help, allso without success, so now I'll try here and hope some friendly and patient soul will help.<br><br>I want to change the interval on how often the script checks for new items in the RSS feed, and posts it in channel. Currently the script checks every 10th minute for a new item, and post it correctly. But I want it to check like, say every 3rd minute instead!?<br><br>It's not that I haven't tried changing some code in the script, but I can't seem to get it working right.<br><br>For thoes who's not familiar with the code, here it is (This is the original 'working' code, with 10 minute interval):<br><div class="codebox"><p>Code: </p><pre><code>array unset feed#### -------------------------------------------------------------## ---- Setup --------------------------------------------------set feed(newzdk) {  URL=http://www.newz.dk/rss  DATABASE=scripts/dbase/rssnews/.newzdk  CHANNELS=ALL  POSTNEWS=1  POSTLIMIT=3  PUBLIMIT=3  MSGLIMIT=5  POSTLAYOUT=Newz.dk Update: \002&lt;upfirstchar &lt;news&gt;&gt;\002 (Læs nyhed: &lt;link&gt;)  TRIGLAYOUT=\[\002&lt;id&gt;\002\] \002&lt;upfirstchar &lt;news&gt;&gt;\002 - &lt;link&gt;}## ---- End of Setup -------------------------------------------## -------------------------------------------------------------if {[package vcompare [info tclversion] 8.4] &lt; 0} {  putlog "You don't have TCL 8.4, you have to upgrade to version 8.4 or higher to use [file tail [info script]]."  return;}package require httpnamespace eval rss {  variable protect 60  variable timeout 20  variable pubbind {!news}  variable msgbind {news}  variable v_major 4  variable v_minor 5  variable v_build 0251  variable version $v_major.$v_minor.$v_build  variable client "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3"  bind PUB -|- $pubbind [namespace current]::public  bind MSG -|- $msgbind [namespace current]::private  bind TIME -|- {?0 * * * *} [namespace current]::check  namespace export public private check}proc rss::check {args} {  global feed  variable client  variable timeout  putquick "PING :[clock seconds]" -next  foreach id [array names feed] {    set url "0"    set database "0"    set channels "0"    set postnews "1"    set postlimit "3"    set publimit "3"    set msglimit "10"    set postlayout {\00314(\00307&lt;publisher&gt;\00314)\00307 &lt;news&gt; \00314&lt;\00307&lt;link&gt;\00314&gt;\003}    foreach line [split $feed($id) \n] {      regsub -all -- {/\*.*?\*/} $line {} line      regexp -nocase -- {^\s*URL=(.+?)\s*$} $line tmp url      regexp -nocase -- {^\s*DATABASE=(.+?)\s*$} $line tmp database      regexp -nocase -- {^\s*CHANNELS=(.+?)\s*$} $line tmp channels      regexp -nocase -- {^\s*POSTNEWS=(.+?)\s*$} $line tmp postnews      regexp -nocase -- {^\s*POSTLIMIT=(.+?)\s*$} $line tmp postlimit      regexp -nocase -- {^\s*PUBLIMIT=(.+?)\s*$} $line tmp publimit      regexp -nocase -- {^\s*MSGLIMIT=(.+?)\s*$} $line tmp msglimit      regexp -nocase -- {^\s*POSTLAYOUT=(.+?)\s*$} $line tmp postlayout    }    if {($url == 0) || ($database == 0) || ($channels == 0)} {      putlog "RSS: Warning: Couldn't load configuration for the \[$id\] feed."      continue    }    if {$postnews == 0} {      continue    }    if {![file isdirectory [file dirname $database]]} {      file mkdir [file dirname $database]    }    set count 0    set data {}    http::config -useragent $client    catch {http::geturl $url -command "[namespace current]::check:data {$database} {$channels} {$postlimit} {$postlayout}" -timeout [expr $timeout * 1000]}  }}proc rss::check:data {database channels postlimit postlayout token} {  upvar 0 $token state  if {![string equal -nocase $state(status) "ok"]} {    return 0  }  set latestnews "iddqd"  if {[file exists $database]} {    set temp [open $database r+]    set latestnews [gets $temp]    if {[string length $latestnews] &lt;= 1} {      set latestnews "iddqd"    }    close $temp  }  set data [http::data $token]  http::cleanup $token  set publisher [publisher $data]  set data [parse $data]  set temp [open $database w+]  set postlayout [join $postlayout { }]  foreach {item} $data {    regsub -all -- {&lt;id&gt;} $postlayout [lindex $item 0] output    regsub -all -- {&lt;publisher&gt;} $output $publisher output    regsub -all -- {&lt;link&gt;} $output [lindex $item 1] output    regsub -all -- {&lt;news&gt;} $output [lindex $item 2] output    regsub -all -- {&lt;upfirstchar\s(.*?)&gt;} [clean $output] {[upfirstchar "\1"]} output    puts $temp [decode [subst $output]]  }  close $temp  set count 0  set temp [open $database r+]  while {![eof $temp]} {    gets $temp headline    if {([string equal -nocase $latestnews $headline]) || ([string equal -nocase $latestnews "iddqd"]) || ($count == $postlimit)} {      break    }    incr count    msg $channels $headline  }  close $temp}proc rss::news {target id type} {  global feed  variable client  variable timeout  if {$type == 2} {    set msgtype PRIVMSG  } else {    set msgtype NOTICE  }  set url "0"  set publimit "3"  set msglimit "10"  set triglayout "\00314\[\00307&lt;id&gt;\00314\]\00307 &lt;news&gt; \00314&lt;\00307&lt;link&gt;\00314&gt;\003"  foreach item [split $feed($id) \n] {    regsub -all -- {/\*.*?\*/} $item {} item    regexp -nocase -- {^\s*URL=(.+?)\s*$} $item tmp url    regexp -nocase -- {^\s*PUBLIMIT=(.+?)\s*$} $item tmp publimit    regexp -nocase -- {^\s*MSGLIMIT=(.+?)\s*$} $item tmp msglimit    regexp -nocase -- {^\s*TRIGLAYOUT=(.+?)\s*$} $item tmp triglayout  }  if {($url == 0)} {    putquick "$msgtype $target :Warning: Couldn't load configuration for the \[$id\] feed."    return 0  }  if {$type == 1} {    set limit $msglimit  } elseif {$type == 2} {    set limit $publimit  } else {    return 0  }  http::config -useragent $client  catch {http::geturl $url -timeout [expr $timeout * 1000]} token  if {[regexp -nocase -- {^couldn\'t\sopen\ssocket:\s+?(.*)$} $token tmp state(status)]} {    putquick "$msgtype $target :Warning: Couldn't connect to the \[$id\] feed ($state(status))."    return 0  }  upvar 0 $token state  if {![string equal -nocase $state(status) "ok"]} {    putquick "$msgtype $target :Warning: Couldn't connect to the \[$id\] feed (connection $state(status))."    return 0  }  set data [http::data $token]  http::cleanup $token  set publisher [publisher $data]  set data [parse $data]  set count 0  set triglayout [join $triglayout { }]  foreach {item} $data {    incr count    regsub -all -- {&lt;id&gt;} $triglayout [lindex $item 0] output    regsub -all -- {&lt;publisher&gt;} $output $publisher output    regsub -all -- {&lt;link&gt;} $output [lindex $item 1] output    regsub -all -- {&lt;news&gt;} $output [lindex $item 2] output    regsub -all -- {&lt;upfirstchar\s(.*?)&gt;} [clean $output] {[upfirstchar "\1"]} output    set output [decode [subst $output]]    if {$type == 2} {      if {[regexp -- {c} [getchanmode $target]]} {        set output [stripcodes c $output]      }    }    puthelp "$msgtype $target :$output"    if {($count == $limit)} {      break    }  }}proc rss::publisher {content} {  set publisher {n/a}  regsub -all -- {\n+|\s+|\t+} $content { } content  regsub -all -- {([\\&amp;])} $content {\\\1} content  regexp -nocase -- {&lt;title&gt;(.+?)&lt;/title&gt;} $content tmp publisher  return $publisher}proc rss::parse {content} {  regsub -all -- {\n+|\s+|\t+} $content { } content  regsub -all -- {([\\&amp;])} $content {\\\1} content  set item 0  set news ""  while {[regexp -nocase -- {&lt;item(\s[^&gt;]*?)?&gt;(.+?)&lt;/item&gt;} $content -&gt; &amp; value]} {    incr item    set title {n/a}    regexp -nocase -- {&lt;title&gt;(.+?)&lt;/title&gt;} $value -&gt; title    regexp -nocase -- {\&lt;\!\[CDATA\[(.*?)\]\]\&gt;} $title -&gt; title    set link {n/a}    regexp -nocase -- {&lt;link&gt;(.+?)&lt;/link&gt;} $value -&gt; link    regexp -nocase -- {\&lt;\!\[CDATA\[(.*?)\]\]\&gt;} $link -&gt; link    regsub -nocase -- {&lt;item.*?&gt;.+?&lt;/item&gt;} $content {} content    lappend news "$item {$link} {$title}"  }  return [lsort -integer -unique -index 0 $news]}proc rss::decode {content} {  if {![regexp -- &amp; $content]} {    return $content  }  set escapes {      \x20 " \x22 &amp; \x26 &amp;apos; \x27 – \x2D &lt; \x3C &gt; \x3E ˜ \x7E € \x80 ¡ \xA1    ¢ \xA2 £ \xA3 ¤ \xA4 ¥ \xA5 ¦ \xA6 § \xA7 ¨ \xA8 © \xA9 ª \xAA « \xAB    ¬ \xAC ­ \xAD ® \xAE &amp;hibar; \xAF ° \xB0 ± \xB1 ² \xB2 ³ \xB3 ´ \xB4 µ \xB5    ¶ \xB6 · \xB7 ¸ \xB8 ¹ \xB9 º \xBA » \xBB ¼ \xBC ½ \xBD ¾ \xBE ¿ \xBF    À \xC0 Á \xC1 Â \xC2 Ã \xC3 Ä \xC4 Å \xC5 Æ \xC6 Ç \xC7 È \xC8 É \xC9    Ê \xCA Ë \xCB Ì \xCC Í \xCD Î \xCE Ï \xCF Ð \xD0 Ñ \xD1 Ò \xD2 Ó \xD3    Ô \xD4 Õ \xD5 Ö \xD6 × \xD7 Ø \xD8 Ù \xD9 Ú \xDA Û \xDB Ü \xDC Ý \xDD    Þ \xDE ß \xDF à \xE0 á \xE1 â \xE2 ã \xE3 ä \xE4 å \xE5 æ \xE6 ç \xE7    è \xE8 é \xE9 ê \xEA ë \xEB ì \xEC í \xED î \xEE ï \xEF ð \xF0 ñ \xF1    ò \xF2 ó \xF3 ô \xF4 õ \xF5 ö \xF6 ÷ \xF7 ø \xF8 ù \xF9 ú \xFA û \xFB    ü \xFC ý \xFD þ \xFE ÿ \xFF  }  set content [string map $escapes $content]  regsub -all -- {&amp;[a-zA-Z]+?;} [clean $content] {?} content  regsub -all -- {&amp;#(\d{1,3});} $content {[format %c [scan \1 %d]]} content  return [subst $content]}proc rss::private {nickname hostname handle arguments} { global feed variable spam variable protect  set arguments [clean $arguments]  set spewfeed [lindex $arguments 0]  if {![validfeed $spewfeed 1]} {    putquick "NOTICE $nickname :Please supply a valid feed: [join [lsort -dictionary [array names feed]] ",\x20"]"    return 0  }  set spewfeed [validfeed $spewfeed 2]</code></pre></div><br>There it is.. Isn't it just tasty  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Please help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Tue Jul 05, 2005 2:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
