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

	<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-28T21:16:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2004-06-28T21:16:17-04:00</updated>

		<published>2004-06-28T21:16:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38003#p38003</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38003#p38003"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38003#p38003"><![CDATA[
that's working - thanks alot =)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Mon Jun 28, 2004 9:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-06-28T11:33:33-04:00</updated>

		<published>2004-06-28T11:33:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37976#p37976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37976#p37976"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37976#p37976"><![CDATA[
Something like this should work<div class="codebox"><p>Code: </p><pre><code>set str [string map {"&amp;" "\&amp;"} $str]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Mon Jun 28, 2004 11:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2004-06-28T08:38:33-04:00</updated>

		<published>2004-06-28T08:38:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37973#p37973</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37973#p37973"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37973#p37973"><![CDATA[
thanks user - it's working great!<br><br>one more thing about strings (slowly getting through the list!)<br><br>sometimes when retrieving text from a website, it puts extra characters with certain characters, like this for '&amp;':<br><br>S&amp;P Affirms ANZ National Bank Ratings<br><br>it puts 'amp;' with the '&amp;'<br>so what I'm wondering is if I can specify to remove the amp; part, if it appears in a string, like $remove(%var,amp;) would do in mIRC...<br>thanks again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Mon Jun 28, 2004 8:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-06-28T00:50:16-04:00</updated>

		<published>2004-06-28T00:50:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37963#p37963</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37963#p37963"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37963#p37963"><![CDATA[
<blockquote class="uncited"><div>any ideas on how it could do so if all the letters are upper no matter if there are other symbols in the line?</div></blockquote><div class="codebox"><p>Code: </p><pre><code>if {![string match {*[a-z]*} $str]} {  # $str does not contain any lowercase letters}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Jun 28, 2004 12:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2004-06-27T03:52:12-04:00</updated>

		<published>2004-06-27T03:52:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37926#p37926</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37926#p37926"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37926#p37926"><![CDATA[
<blockquote class="uncited"><div>Actually, dunno what I was thinking when I posted that...<br><br>But...<br><br>Change the:<div class="codebox"><p>Code: </p><pre><code>} else {  set rtrold $rtr}</code></pre></div>To just:<div class="codebox"><p>Code: </p><pre><code>  set rtold $rtr}</code></pre></div></div></blockquote>cool got that one thanks <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=2210">NewzUK</a> — Sun Jun 27, 2004 3:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2004-06-27T03:50:58-04:00</updated>

		<published>2004-06-27T03:50:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37925#p37925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37925#p37925"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37925#p37925"><![CDATA[
one more question if I could - with regards to 'string is upper', I've got a different style to print to the channel if the text is upper, however I've found if there are numerals or other symbols involved, it dosn't seem to work as the upper line, and sends it in the 'else' e.g.:<br><br>POWERFUL EXPLOSION HEARD IN CENTRAL BAGHDAD - REUTERS WITNESSES<br><br>did not get recognised as an 'is upper'.<br><br>any ideas on how it could do so if all the letters are upper no matter if there are other symbols in the line?<br><br>thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Sun Jun 27, 2004 3:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-06-27T03:46:48-04:00</updated>

		<published>2004-06-27T03:46:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37924#p37924</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37924#p37924"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37924#p37924"><![CDATA[
Actually, dunno what I was thinking when I posted that...<br><br>But...<br><br>Change the:<div class="codebox"><p>Code: </p><pre><code>} else {  set rtrold $rtr}</code></pre></div>To just:<div class="codebox"><p>Code: </p><pre><code>  set rtold $rtr}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Jun 27, 2004 3:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2004-06-27T02:36:01-04:00</updated>

		<published>2004-06-27T02:36:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37922#p37922</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37922#p37922"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37922#p37922"><![CDATA[
actually, I think I answered my own question there - just added the setting of the old var to the new one after each of the else/if's.<br><br>thanks again for the help, and will see how it goes!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Sun Jun 27, 2004 2:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2004-06-27T02:22:42-04:00</updated>

		<published>2004-06-27T02:22:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37920#p37920</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37920#p37920"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37920#p37920"><![CDATA[
thanks strikelight - since I posted that, I added a couple of else/elseif's to deal with some content in the $var :<br><br>if {[string is upper $rtr]} {<br>    putserv "PRIVMSG #channel :4,4 0,4 [gettime +0]ET $rtr "<br>} elseif {[string match *-* $rtr]} {<br>    putserv "PRIVMSG #Newsroom2 :7,7 1,15 [gettime +0]ET $rtr "<br>} else {<br>    putserv "PRIVMSG #Newsroom2 :4,4 1,15 [gettime +0]ET $rtr "<br><br>will that mess up the:<br><br>} else {<br>    set rtrold $rtr<br><br>? thanks again<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Sun Jun 27, 2004 2:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-06-27T02:01:21-04:00</updated>

		<published>2004-06-27T02:01:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37918#p37918</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37918#p37918"/>
		<title type="html"><![CDATA[Re: var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37918#p37918"><![CDATA[
<blockquote class="uncited"><div>Hi, I made this script to retrieve website data at timed intervals, but I'm trying to make it so it will not send anything to the channel if the var $rtr hasn't changed since the last check...would appreciate any help - thanks!<br><div class="codebox"><p>Code: </p><pre><code>    proc pub:rtr { nick uhost handle channel arg } {    set sock [egghttp:geturl http://www.myurl.com/ getrtr]    return 1}  proc getrtr {sock} {    global rtrurl    set headers [egghttp:headers $sock]    set body [egghttp:data $sock]      foreach line [split $body \n] {    if {[string match "*52_*" $line]} {    set rtr [gettok $line 2 62]    set rtr [gettok $rtr 0 60]    set rtrurl [gettok $line 5 34]    putserv "PRIVMSG #channel :/0034,4 /0031,15 $rtr /00314,14 /003"  } }}</code></pre></div></div></blockquote>You will need to store a copy into a global variable and check against it then...<br><div class="codebox"><p>Code: </p><pre><code>proc getrtr {sock} {    global rtrurl rtrold    set headers [egghttp:headers $sock]    set body [egghttp:data $sock]    egghttp:cleanup $sock    foreach line [split $body \n] {      if {[string match "*52_*" $line]} {        set rtr [gettok $line 2 62]        set rtr [gettok $rtr 0 60]        set rtrurl [gettok $line 5 34]        if {![info exists rtrold] || ($rtr != $rtrold)} {          putserv "PRIVMSG #channel :/0034,4 /0031,15 $rtr /00314,14 /003"        } else {          set rtrold $rtr        }      }    }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Jun 27, 2004 2:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2004-06-26T22:52:25-04:00</updated>

		<published>2004-06-26T22:52:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37916#p37916</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37916#p37916"/>
		<title type="html"><![CDATA[var help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37916#p37916"><![CDATA[
Hi, I made this script to retrieve website data at timed intervals, but I'm trying to make it so it will not send anything to the channel if the var $rtr hasn't changed since the last check...would appreciate any help - thanks!<br><div class="codebox"><p>Code: </p><pre><code>    proc pub:rtr { nick uhost handle channel arg } {    set sock [egghttp:geturl http://www.myurl.com/ getrtr]    return 1}  proc getrtr {sock} {    global rtrurl    set headers [egghttp:headers $sock]    set body [egghttp:data $sock]      foreach line [split $body \n] {    if {[string match "*52_*" $line]} {    set rtr [gettok $line 2 62]    set rtr [gettok $rtr 0 60]    set rtrurl [gettok $line 5 34]    putserv "PRIVMSG #channel :/0034,4 /0031,15 $rtr /00314,14 /003"  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Sat Jun 26, 2004 10:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
