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

	<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>2013-07-06T05:15:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-07-06T04:58:37-04:00</updated>

		<published>2013-07-06T04:58:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101780#p101780</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101780#p101780"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101780#p101780"><![CDATA[
<blockquote class="uncited"><div>I was referring to:<div class="codebox"><p>Code: </p><pre><code>      if {![isbotnick $nick] &amp;&amp; [throttle_ $uhost,$chan,news $::readxml::ary(throttle_time)]} {         putserv "$arg $chan :$nick, you have been Throttled! You're going too fast and making my head spin!"      } </code></pre></div>Isn't the whole idea to STOP the execution of the rest of the code if it's throttled? Maybe I'm missing something.</div></blockquote>You are indeed correct. It needs a return or the evaluation needs to contain } else { # != throttled/botnick }<br><br>Not sure where that missing return went. Maybe my dog ate it? Odd, since I don't have a dog.<br><blockquote class="uncited"><div>Anyway, you two mind your manners. We aren't here in any sort of competition, so there's no 1st place, second or whatever. We all want to learn new stuff and expand our skills. Don't we?</div></blockquote>It's more about it than that. It's about alterations, and who gets the credit/blame for the bugs those alterations cause. In this case I would get the complaints for it when it wasn't my doing. Right? Maybe? Bueller? Bueller?<br><blockquote class="uncited"><div>Regarding the <em class="text-italics">$line exploit</em>, chill, the line is taken from that xml page, so I doubt they will start exploiting their own users that want to fetch some info. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> Good point anyway. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"></div></blockquote>I always prefer to wear shoes when walking outdoors. Don't you? Never know when you are going to step on a nail. Using that $line thing is akin to going barefoot. All I'm saying... heh<br><blockquote class="uncited"><div>As for spelling names, speechles you are no stranger to this either. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>Dude, your name is hard to remember. Is it AE or EA? Without looking I have a 50/50 chance of getting your name right.. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br><br>BTW, Note to anyone still reading this thread... Here's some juicy parts I didn't want to leave out...<br><br>Just fyi ... I misspelt the damn variable name, casafreenews, which contains the list of info/links to spew. When it stored the last-url it had seen, I had it working like so, [lindex $casefreenews 2]. Wrong.. BZZT! It starts with casA not casE. This effectively was creating the scenario where it wasn't able to remember the last url it had seen. The reason it was still failing to work I just thought I'd throw out there for legacy sake.  Someone in the future, perhaps 30 years from now might be reading this. To that future person reading this, you're still using eggdrop? seriously? What damn version is it up to? I know you cant answer me. But answer somewhere in this thread just to bump it up to the top after you've read this. People in the future would get a kick seeing someone predict their bumping of this very post in advance even if not accurately only figuratively, eh.. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Also, super-secret-news, something most will likely scoff at as rumor, but expect an incith-google update in the very near future. Very near meaning this weekend... stay tuned to these forums for updates. Follow us through twitter at <a href="http://twitter.com/suqmuhnutz" class="postlink">http://twitter.com/suqmuhnutz</a> for real-time announcements and special VIP access to on-the-spot bug-fixes and feature requests... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>source:<span style="text-decoration:underline"><a href="https://twitter.com/suqmuhnutz/status/353446861207633920" class="postlink">https://twitter.com/suqmuhnutz/status/353446861207633920</a></span><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Jul 06, 2013 4:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-07-06T03:43:14-04:00</updated>

		<published>2013-07-06T03:43:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101779#p101779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101779#p101779"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101779#p101779"><![CDATA[
I was referring to:<div class="codebox"><p>Code: </p><pre><code>      if {![isbotnick $nick] &amp;&amp; [throttle_ $uhost,$chan,news $::readxml::ary(throttle_time)]} {         putserv "$arg $chan :$nick, you have been Throttled! You're going too fast and making my head spin!"      } </code></pre></div>Isn't the whole idea to STOP the execution of the rest of the code if it's throttled? Maybe I'm missing something.<br><br>Anyway, you two mind your manners. We aren't here in any sort of competition, so there's no 1st place, second or whatever. We all want to learn new stuff and expand our skills. Don't we?<br><br>Regarding the <em class="text-italics">$line exploit</em>, chill, the line is taken from that xml page, so I doubt they will start exploiting their own users that want to fetch some info. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> Good point anyway. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><br><br>As for spelling names, speechles you are no stranger to this either. <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=187">caesar</a> — Sat Jul 06, 2013 3:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-07-06T05:15:21-04:00</updated>

		<published>2013-07-05T17:42:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101778#p101778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101778#p101778"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101778#p101778"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Puh Rum Pum Pum Pum# This script will announce news just like an rss script# as well as allowing users to type commands and see# the latest news via notice as well. Fully configurable.# Enjoy, and may the force be with you.... always....# speechles was here :Ppackage require httpsetudef flag usenewsnamespace eval readxml {   # config - make your changes here   # trigger character   set ary(pref) "!"   # command used to reply to user   # this can be a list of space delimited commands   set ary(commands) "news"   # amount user can issue before throttle   set ary(throttle) 2   # throttle time   set ary(throttle_time) 30   # time to announce new news items   # this can be a list of space delimited time binds.   # the one you wish to use for bind_time uncommented.   # set ary(bind_time) "00* 15* 30* 45*" ; # every 15 minutes   # set ary(bind_time) "00* 30*" ; # every 30 minutes   # set ary(bind_time) "00*" ; # every 60 minutes exactly on the hour   set ary(bind_time) "*" ; # every minute   # url to news page   set ary(page) http://travian.gamingcrazy.net/erep-api/feeds/militaryfeeds.xml   # parsing regex used to gather news   set ary(regex) {&lt;info&gt;(.*?)&lt;/info&gt;.*?&lt;link&gt;(.*?)&lt;/link&gt;}   # how to snip last-id from the url mask   set ary(snip_lastid) {^(.*?)$}   # max amount of news items to announce   set ary(max_bot) 5   # max amount of news items for users   set ary(max_user) 5   # display format for news messages, variables are: %info and %url   # these can be used and will be replaced with actual values, newline (\n) will   # let you span multiple lines if you wish. If something is too long it will   # be cut off, be aware of this... use colors, bold, but remember to \escape any   # special tcl characters.   set ary(display_format) "\[\002NEWS\002\] %url\n%info"   # script version   set ary(version) "2.3"}# bindsforeach bind [split $::readxml::ary(commands)] {   bind pub -|- "$::readxml::ary(pref)$bind" ::readxml::pub_   bind msg -|- "$::readxml::ary(pref)$bind" ::readxml::msg_}foreach bind [split $::readxml::ary(bind_time)] {   bind time - $bind ::readxml::magic_}bind time - ?0* ::readxml::throttleclean_namespace eval readxml {   # main - time bind - magic   proc magic_ {args} {      news_ $::botnick [getchanhost $::botnick] $::botnick "all" "magic"   }   # main - msg bind - notice   proc msg_ {nick uhost hand arg} {      news_ $nick $uhost $hand $nick "notice"   }   # main - pub bind - privmsg   proc pub_ {nick uhost hand chan arg} {      if {![channel get $chan usenews]} { return }      news_ $nick $uhost $hand $chan "privmsg"   }   # sub - give news   proc news_ {nick uhost hand chan arg} {      if {![isbotnick $nick] &amp;&amp; [throttle_ $uhost,$chan,news $::readxml::ary(throttle_time)]} {         putserv "$arg $chan :$nick, you have been Throttled! You're going too fast and making my head spin!"         # that missing return mentioned by caeser in this thread         # now makes its official appearance below...         return      }      set a "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1"      set t [::http::config -useragent $a]      catch { set t [::http::geturl $::readxml::ary(page) -timeout 30000] } error      # error condition 1, socket error or other general error      if {![string match -nocase "::http::*" $error] &amp;&amp; ![isbotnick $nick]} {         putserv "$arg $chan :[string totitle [string map {"\n" " | "} $error]] \( $::readxml::ary(page) \)"         return      }      # error condition 2, http error      if {![string equal -nocase [::http::status $t] "ok"] &amp;&amp; ![isbotnick $nick]} {         putserv "$arg $chan :[string totitle [::http::status $t]] \( $::readxml::ary(page) \)"         return      }      set html [::http::data $t]      ::http::cleanup $t      set casafreenews [regexp -all -inline "$::readxml::ary(regex)" $html]      set c 0      foreach {junk info link} $casafreenews {         incr c ; set url "http://travian.gamin.ds$link"         if {[isbotnick $nick]} {            if {$c &gt; $::readxml::ary(max_bot)} { break }            if {[info exists ::readxml::ary(last)]} { if {$url == $::readxml::ary(last)} { break } }         } elseif {$c &gt; $::readxml::ary(max_user)} { break }         set output [string map [list "%info" "[mapit_ [string map [list "&lt;br /&gt;" ""] $info]]" "%url" "$url"] $::readxml::ary(display_format)]         if {![string equal "magic" $arg]} {            foreach line [split $output "\n"] { puthelp "$arg $chan :$line" }         } else {            foreach ch [channels] {               if {![channel get $ch usenews]} { continue }               foreach line [split $output "\n"] { puthelp "privmsg $ch :$line" }            }         }      }      if {[string equal "magic" $arg]} { set ::readxml::ary(last) "http://travian.gamin.ds[lindex $casafreenews 2]" }   }   # sub - map it   proc mapit_ {t} { return [string map [list "'" "'" """ "\""] $t] }   # Throttle Proc (slightly altered, super action missles) - Thanks to user   # see this post: http://forum.egghelp.org/viewtopic.php?t=9009&amp;start=3   proc throttle_ {id seconds} {      if {[info exists ::readxml::throttle($id)]&amp;&amp;[lindex $::readxml::throttle($id) 0]&gt;[clock seconds]} {         set ::readxml::throttle($id) [list [lindex $::readxml::throttle($id) 0] [set value [expr {[lindex $::readxml::throttle($id) 1] +1}]]]         if {$value &gt; $::readxml::ary(throttle)} { set id 1 } { set id 0 }      } {         set ::readxml::throttle($id) [list [expr {[clock seconds]+$seconds}] 1]         set id 0      }   }   # sub - clean throttled users   proc throttleclean_ {args} {      set now [clock seconds]      foreach {id time} [array get ::readxml::throttle] {         if {[lindex $time 0]&lt;=$now} {unset ::readxml::throttle($id)}      }   }}putlog "news and announce.tcl v$::readxml::ary(version) loaded."</code></pre></div><blockquote class="uncited"><div>&lt;guy1&gt; wtf.. that speechles guy is a dick<br>&lt;guy2&gt; tell me about it<br>&lt;speechles&gt; SCREW YOU GUYS!</div></blockquote>Just remember how to spell my name, speechles<br>there isn't two s at the end, efnet ate the last one.<br><br>Also.. To use the script I made it conform to normal:<br>.chanset #chan +usenews enables in channel<br><br>Tested and this time, we have a winnar. puh rum pum pum pum.<br><br>EDIT: go figure, didn't test _every_ part of the script. Somewhere gravity caused a rift in space time, or something to do with higgs boson particles, caused a missing "return" in the script which would cause the throttle to announce but never become effective. This is now corrected thanks caeser (did i get the name right this time? hint: yes because i looked and cheated)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Jul 05, 2013 5:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-07-05T17:37:43-04:00</updated>

		<published>2013-07-05T17:37:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101777#p101777</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101777#p101777"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101777#p101777"><![CDATA[
spechless trust me if i knew you talk this much i wouldnt modify the code.<br>gamer asked me to modify it because it didnt worked as he wanted, when i was finished i posted here because he didnt respond where we first talked and thats all.<br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> its very obviously that you really need to cool down a little bit its like i tooked your girlfriend from you. You can always ignore my post as it wasnt posted for you. Next time i modify some of your 'possible' code please sue me and keep the other small talk for yourself.<br><br>PS: I really thought frustrated 'kids' like you discovered girls some time ago, i guess i was wrong.<br><br>Next time make a note somewhere "Madalin or anyone else don`t edit this or i will shoot myself' or something like this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> i would really appreciate<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Fri Jul 05, 2013 5:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-07-05T18:37:55-04:00</updated>

		<published>2013-07-05T17:14:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101776#p101776</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101776#p101776"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101776#p101776"><![CDATA[
<blockquote class="uncited"><div>* snipped exploitable code *</div></blockquote>I know you pace the floor looking for someone to help. Don't get me wrong. I can sense the eagerness. The feeling of needing something to do to make your tcl skills better. I dig it. You are useful. You submit scripts. Well done.<br><br>The part that gets under my skin is when someone introduces exploits into my scripts and leaves my name there and not their name claiming credit for adding the exploit. Here is where your skills will get better. Let me explain.<br><div class="codebox"><p>Code: </p><pre><code>set existss($ch,$line) "[unixtime]" </code></pre></div>You realize what this does, right? $line will and does contain special characters. You allow substitution within the array name. This is called an exploitable bug. Please take the time to add your name to the script when making any changes. Do not just assume that authors of open source scripts will claim credit for code you may contribute that compromises their eggdrop. Thanks....<br><br>And caesar, the return is not required. The value returned from the last command will be returned in the absense of return.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Jul 05, 2013 5:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-07-05T13:58:23-04:00</updated>

		<published>2013-07-05T13:58:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101769#p101769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101769#p101769"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101769#p101769"><![CDATA[
Shouldn't be there a return in the <em class="text-italics">if</em> check regarding the throttling?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jul 05, 2013 1:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-07-05T11:05:13-04:00</updated>

		<published>2013-07-05T11:05:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101768#p101768</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101768#p101768"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101768#p101768"><![CDATA[
Try this<br><div class="codebox"><p>Code: </p><pre><code># Puh Rum Pum Pum Pum# This script will announce news just like an rss script# as well as allowing users to type commands and see# the latest news via notice as well. Fully configurable.# Enjoy, and may the force be with you.... always....# speechles was here :Ppackage require httpsetudef flag nopubnewsnamespace eval news {# config - make your changes here# trigger characterset ary(pref) "!"# command used to reply to user# this can be a list of space delimited commandsset ary(commands) "events"# amount user can issue before throttleset ary(throttle) 2# throttle timeset ary(throttle_time) 30# time to announce new news items# this can be a list of space delimited time binds.# the one you wish to use for bind_time uncommented.# set ary(bind_time) "00* 15* 30* 45*" ; # every 15 minutes# set ary(bind_time) "00* 30*" ; # every 30 minutes# set ary(bind_time) "00*" ; # every 60 minutes exactly on the hourset ary(bind_time) "*" ; # every minute# url to news pageset ary(page) http://travian.gamingcrazy.net/erep-api/feeds/militaryfeeds.xml# parsing regex used to gather newsset ary(regex) {&lt;info&gt;(.*?)&lt;/info&gt;.*?&lt;link&gt;(.*?)&lt;/link&gt;}# how to snip last-id from the url maskset ary(snip_lastid) {^(.*?)$}# max amount of news items to announceset ary(max_bot) 1# max amount of news items for usersset ary(max_user) 1# display format for news messages, variables are: %info and %url# these can be used and will be replaced with actual values, newline (\n) will# let you span multiple lines if you wish. If something is too long it will# be cut off, be aware of this... use colors, bold, but remember to \escape any# special tcl characters.set ary(display_format) "\[\002eRepublik\002\] \002\0033\Event:\002\ %info. - \002\0032\Link:\002\ %url"# script versionset ary(version) "2.3"}# bindsforeach bind [split $::news::ary(commands)] {bind pub -|- "$::news::ary(pref)$bind" ::news::pub_bind msg -|- "$::news::ary(pref)$bind" ::news::msg_}foreach bind [split $::news::ary(bind_time)] {bind time - $bind ::news::magic_}bind time - ?0* ::news::throttleclean_namespace eval news {# main - time bind - magicproc magic_ {args} {news_ $::botnick [getchanhost $::botnick] $::botnick "all" "magic"}# main - msg bind - noticeproc msg_ {nick uhost hand arg} {news_ $nick $uhost $hand $nick "notice"}# main - pub bind - privmsgproc pub_ {nick uhost hand chan arg} {if {[channel get $chan nopubnews]} { return }news_ $nick $uhost $hand $chan "privmsg"}# sub - give newsproc news_ {nick uhost hand chan arg} {global existssif {![isbotnick $nick] &amp;&amp; [throttle_ $uhost,$chan,news $::news::ary(throttle_time)]} {putserv "$arg $chan :$nick, you have been Throttled! You're going too fast and making my head spin!"}set a "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1"set t [::http::config -useragent $a]catch { set t [::http::geturl $::news::ary(page) -timeout 30000] } error# error condition 1, socket error or other general errorif {![string match -nocase "::http::*" $error] &amp;&amp; ![isbotnick $nick]} {putserv "$arg $chan :[string totitle [string map {"\n" " | "} $error]] \( $::news::ary(page) \)"return}# error condition 2, http errorif {![string equal -nocase [::http::status $t] "ok"] &amp;&amp; ![isbotnick $nick]} {putserv "$arg $chan :[string totitle [::http::status $t]] \( $::news::ary(page) \)"return}set html [::http::data $t]::http::cleanup $tset casafreenews [regexp -all -inline "$::news::ary(regex)" $html]set c 0foreach {junk info link} $casafreenews {incr c ; set url "http://erepublik.com$link"if {[isbotnick $nick]} {if {$c &gt; $::news::ary(max_bot)} { break }regexp "$::news::ary(snip_lastid)" $url - idif {[info exists ::news::ary(last)]} { if {$id == $::news::ary(last)} { break } }} elseif {$c &gt; $::news::ary(max_user)} { break }set output [string map [list "%info" "[mapit_ [string map [list "&lt;br /&gt;" ""] $info]]" "%url" "$url"] $::news::ary(display_format)]if {![string equal "magic" $arg]} {foreach line [split $output "\n"] {if {![info exists existss($chan,$line)]} {puthelp "$arg $chan :$line"set existss($chan,$line) "[unixtime]"}}} else {foreach ch [channels] {if {[channel get $ch nopubnews]} { continue }foreach line [split $output "\n"] {if {![info exists existss($ch,$line)]} {puthelp "privmsg $ch :$line"set existss($ch,$line) "[unixtime]"}}}}if {[string equal "magic" $arg]} { regexp "$::news::ary(snip_lastid)" [lindex $casafreenews 2] - ::news::ary(last) }}}# sub - map itproc mapit_ {t} { return [string map [list "'" "'" """ "\""] $t] }# Throttle Proc (slightly altered, super action missles) - Thanks to user# see this post: http://forum.egghelp.org/viewtopic.php?t=9009&amp;start=3proc throttle_ {id seconds} {if {[info exists ::news::throttle($id)]&amp;&amp;[lindex $::news::throttle($id) 0]&gt;[clock seconds]} {set ::news::throttle($id) [list [lindex $::news::throttle($id) 0] [set value [expr {[lindex $::news::throttle($id) 1] +1}]]]if {$value &gt; $::news::ary(throttle)} { set id 1 } { set id 0 }} {set ::news::throttle($id) [list [expr {[clock seconds]+$seconds}] 1]set id 0}}# sub - clean throttled usersproc throttleclean_ {args} {set now [clock seconds]foreach {id time} [array get ::news::throttle] {if {[lindex $time 0]&lt;=$now} {unset ::news::throttle($id)}}}}putlog "news and announce.tcl v$::news::ary(version) loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Fri Jul 05, 2013 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamer12]]></name></author>
		<updated>2013-07-04T18:06:20-04:00</updated>

		<published>2013-07-04T18:06:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101765#p101765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101765#p101765"/>
		<title type="html"><![CDATA[hello agai]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101765#p101765"><![CDATA[
I tried changing the line as we as copying the above script whole.<br><br>It is still repeating the 1st entry.<div class="codebox"><p>Code: </p><pre><code>set ary(bind_time) "*" ; # every minute    # url to news page    set ary(page) http://travian.gamingcrazy.net/erep-api/feeds/militaryfeeds.xml    # parsing regex used to gather news    set ary(regex) {&lt;info&gt;(.*?)&lt;/info&gt;.*?&lt;link&gt;(.*?)&lt;/link&gt;}    # how to snip last-id from the url mask    set ary(snip_lastid) {^(.*?)$}    # max amount of news items to announce    set ary(max_bot) 1   # max amount of news items for users    set ary(max_user) 1 </code></pre></div>with these settings.<br><br>Ive restarted the bot to.<br><br>thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12058">gamer12</a> — Thu Jul 04, 2013 6:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-07-04T17:48:48-04:00</updated>

		<published>2013-07-04T17:48:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101764#p101764</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101764#p101764"/>
		<title type="html"><![CDATA[Re: thank you bro!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101764#p101764"><![CDATA[
<blockquote class="uncited"><div>It is doing what I wanted ;D<br><br>the only problem is, it keeps on displaying the same item again and again. It should display only when its changed <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"><br><br>any help in it will be appreciated.<br><br>Thanks again speechless. Im speechless ;D</div></blockquote>Yeah, that was my bad. It is this line:<div class="codebox"><p>Code: </p><pre><code>if {[string equal "magic" $arg]} { regexp "$::news::ary(snip_lastid)" [lindex $casafreenews 1] - ::news::ary(last) } </code></pre></div>Which that lindex position is based off: {junk info link}<br>The order they occur in your site, info then link, not link then info.<br><br>link is lindex position 2 now, not 1 anymore...<br><br>the correct line is:<div class="codebox"><p>Code: </p><pre><code>if {[string equal "magic" $arg]} { regexp "$::news::ary(snip_lastid)" [lindex $casafreenews 2] - ::news::ary(last) }</code></pre></div>I've corrected this line in my code posted above if you just want to copy/replace the entire thing as well.<br><br>Also, take special note: The script uses the flag +nopubnews to TURN OFF output in channels. It will automatically work in every channel all at once. This is the opposite of how it usually works with chanset, you normally set a flag for channels you want it working in. This is how the original request asked the flag to operate and this behavior was never changed. Just keep it in mind.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 04, 2013 5:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamer12]]></name></author>
		<updated>2013-07-04T17:21:54-04:00</updated>

		<published>2013-07-04T17:21:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101763#p101763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101763#p101763"/>
		<title type="html"><![CDATA[thank you bro!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101763#p101763"><![CDATA[
It is doing what I wanted ;D<br><br>the only problem is, it keeps on displaying the same item again and again. It should display only when its changed <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"><br><br>any help in it will be appreciated.<br><br>Thanks again speechless. Im speechless ;D<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12058">gamer12</a> — Thu Jul 04, 2013 5:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-07-05T18:37:03-04:00</updated>

		<published>2013-07-04T16:47:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101762#p101762</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101762#p101762"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101762#p101762"><![CDATA[
see code posted below...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 04, 2013 4:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamer12]]></name></author>
		<updated>2013-07-04T16:07:55-04:00</updated>

		<published>2013-07-04T16:07:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101761#p101761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101761#p101761"/>
		<title type="html"><![CDATA[xml reader]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101761#p101761"><![CDATA[
Need a script which can read a XML page and displays on channel whenever its updated. The feed can be accessed once per / 25 seconds.<br><br>&lt;info&gt;Anything between these tags&lt;/info&gt;<br><br><a href="http://goo.gl/NbHrS" class="postlink">http://goo.gl/NbHrS</a> -&gt; is the xml page's link.<br><br>Any help will be appreciated.<br><br>PS: tried every script which is on egghelp.org's tcl section.<br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12058">gamer12</a> — Thu Jul 04, 2013 4:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
