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

	<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>2007-10-26T03:48:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-10-26T03:48:04-04:00</updated>

		<published>2007-10-26T03:48:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77138#p77138</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77138#p77138"/>
		<title type="html"><![CDATA[little problem.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77138#p77138"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>  #--- Download Info  if {[catch {set sock "[socket content-usa.cricinfo.com 80]"} error] == "0"} {    puts $sock "GET /ci/content/match/fixtures/live.html HTTP/1.0"    puts $sock "Accept: text/html"    puts $sock "Host: content-usa.cricinfo.com"    puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"    puts $sock "Connection: close"    puts $sock ""    flush $sock    #--- Header    putquick "PRIVMSG $nick :\037\00300,06Forthcoming Live Coverage\003\037"    putquick "PRIVMSG $nick :\037Date          Time             Match\037"    #--- Filtering Info    while {[gets $sock html] &gt;= "0"} {      if {[string match -nocase "*&lt;tr valign=top*&gt;*" $html] == "1"} {        set x "0"        set line ""        set color "$html"      } elseif {[string match -nocase "*&lt;td nowrap&gt;*" $html] == "1"} {        set line "${line}[lrange [gets $sock] 0 1] "        if {[incr x] &gt;= "2"} {          gets $sock html          gets $sock html          while {[gets $sock html] &gt;= "0" &amp;&amp; [string match -nocase "*&gt;Forecast&lt;*" $html] == "0"} {            if {[string match -nocase "*&lt;br&gt;*" $html] == "1" || [string match -nocase "*&lt;/td&gt;*" $html] == "1"} {              regexp {.html"&gt;(.+)&lt;/a&gt;} $html match html              regexp {(.+)&lt;br&gt;} $html match html              regexp {(.+) &lt;/td&gt;} $html match html              set line "${line} ${html}."            }          }          nextmatch:line $nick $color $line        }      }    }    #--- Footer    putquick "PRIVMSG $nick :\037\00300,06Current Date: [strftime "%a, %d %b %Y %H:%M:%S"]\003\037"    close $sock  } else {    putquick "NOTICE $nick :Timeout while querying Server."  }}proc nextmatch:line {nick color text} {  if {[string match -nocase "*class=?blue?*" $color] == "1"} {    putquick "PRIVMSG $nick :\00306,15[lrange $text 0 1] [string repeat " " [expr 10 - [string length "[lrange $text 0 1]"]]] [lrange $text 2 3]      [lrange $text 4 end]\003"  } else {    putquick "PRIVMSG $nick :[lrange $text 0 1] [string repeat " " [expr 10 - [string length "[lrange $text 0 1]"]]] [lrange $text 2 3]      [lrange $text 4 end]"  }}</code></pre></div>The reply I get is:<br><div class="codebox"><p>Code: </p><pre><code>[00:38] &lt;Cricket`-&gt; Forthcoming Live Coverage[00:38] &lt;Cricket`-&gt; Date          Time             Match[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  06:30 GMT      Namibia v Canada at Windhoek. ICC Intercontinental Cup.[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:00 GMT      Border v South Western Districts at East London. SAA Provincial Three-Day Challenge.[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:00 GMT      Eastern Province v Western Province at Port Elizabeth. SAA Provincial Three-Day Challenge.[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:00 GMT      Gauteng v Free State at Dobsonville. SAA Provincial Three-Day Challenge.[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:00 GMT      North West v Easterns at Potchefstroom. SAA Provincial Three-Day Challenge.[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:30 GMT      South African Invitation XI v New Zealanders at Bloemfontein. Tour Match.[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:30 GMT      Pakistan v South Africa at Multan. 4th ODI.[00:38] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  09:00 GMT      India Red v India Green at Ahmedabad. NKP Salve Challenger Trophy.[00:39] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  06:30 GMT      Kenya v Bermuda at Nairobi (Gym). [00:39] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  06:00 GMT      Pakistan v South Africa at Lahore. 5th ODI.[00:39] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:00 GMT      Griqualand West v North West at Kimberley. SAA Provincial Three-Day Challenge.[00:39] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:00 GMT      Northerns v Free State at Centurion. SAA Provincial Three-Day Challenge.[00:39] &lt;Cricket`-&gt; &lt;span style=\"vertical-align:  08:30 GMT      South Africa A v New Zealanders at Potchefstroom. Tour Match.[00:39] &lt;Cricket`-&gt; Current Date: Fri, 26 Oct 2007 12:38:46</code></pre></div>You see it's not showing date in the first place but showing:<br><div class="codebox"><p>Code: </p><pre><code>&lt;span style=\"vertical-align: </code></pre></div>can I get rid of it?<br><br>The source if:<br><br><a href="http://content-pak.cricinfo.com/ci/content/current/match/fixtures/live.html" class="postlink">http://content-pak.cricinfo.com/ci/cont ... /live.html</a><br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Fri Oct 26, 2007 3:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-10-15T14:14:06-04:00</updated>

		<published>2007-10-15T14:14:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76768#p76768</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76768#p76768"/>
		<title type="html"><![CDATA[little problem.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76768#p76768"><![CDATA[
<blockquote class="uncited"><div>There's a chunk of code missing... <br><br>Also a hint, the decoding done by KrzychuG in your other thread is flawed, and will cause this error.<br><br>Doing a proper decoding would reveal that the conditionals "[gets $sock html] &gt;= 0" and "[string match -nocase "*&gt;Forecast&lt;*" $html] == 0" should be combined using logical AND (&amp;&amp;), creating a proper if-clause.</div></blockquote>Thanks alot nml for pointing the mistake out I have now modified my script but I got some errors take a look please:<br><div class="codebox"><p>Code: </p><pre><code>    while {[gets $sock html] &gt;= "0"} {      if {[string match -nocase "*&lt;tr valign=top*&gt;*" $html] == "1"} {        set x "0"        set line ""        set color "$html"      } elseif {[string match -nocase "*&lt;td nowrap&gt;*" $html] == "1"} {        set line "${line}[lrange [gets $sock] 3 4] "        if {[incr x] &gt;= "2"} {          gets $sock html          gets $sock html          while {[gets $sock html] &gt;= "0"} {            if {[string match -nocase "*&gt;Forecast&lt;*" $html] == "0"} {            if {[string match -nocase "*&lt;br&gt;*" $html] == "1" || [string match -nocase "*&lt;/td&gt;*" $html] == "1"} {              regexp {.html"&gt;(.+)&lt;/a&gt;} $html match html              regexp {(.+)&lt;br&gt;} $html match html              regexp {(.+) &lt;/td&gt;} $html match html              set line "${line} ${html}."            }          }          nextmatch:line $nick $color $line        }      }    }}</code></pre></div>The bot is taking text from:<br><br><a href="http://content-pak.cricinfo.com/ci/content/current/match/fixtures/live.html" class="postlink">LINK</a><br><br>Here is what I get the reply from the bot now:<br><div class="codebox"><p>Code: </p><pre><code>[23:07] &lt;Cricket`-&gt; Forthcoming Live Coverage[23:07] &lt;Cricket`-&gt; Date          Time             Match[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI. &lt;/td&gt;.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI. &lt;/td&gt;. &lt;/td&gt;.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Dolphins v Titans at Durban.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Dolphins v Titans at Durban. SuperSport Series.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Dolphins v Titans at Durban. SuperSport Series. &lt;/td&gt;.[23:07] &lt;Cricket`-&gt; 17&lt;/span&gt; India  v Australia      at Mumbai. 7th ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Pakistan v South Africa at Lahore. 1st ODI. &lt;/td&gt;. &lt;/td&gt;. &lt;/td&gt;. Dolphins v Titans at Durban. SuperSport Series. &lt;/td&gt;. &lt;/td&gt;.</code></pre></div>and then bot crashes:<br><div class="codebox"><p>Code: </p><pre><code>[23:07] * Quits: Cricket`- (cricket@cricket.users.undernet.org) (Excess Flood)</code></pre></div>The bot is supposed to show Date: Time:  Teams and then Venue. Could you please suggest me more thank you soo much.<br><br>iamdeath<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Mon Oct 15, 2007 2:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-10-15T13:15:29-04:00</updated>

		<published>2007-10-15T13:15:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76765#p76765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76765#p76765"/>
		<title type="html"><![CDATA[little problem.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76765#p76765"><![CDATA[
There's a chunk of code missing... <br><br>Also a hint, the decoding done by KrzychuG in your other thread is flawed, and will cause this error.<br><br>Doing a proper decoding would reveal that the conditionals "[gets $sock html] &gt;= 0" and "[string match -nocase "*&gt;Forecast&lt;*" $html] == 0" should be combined using logical AND (&amp;&amp;), creating a proper if-clause.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Oct 15, 2007 1:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-10-15T12:04:16-04:00</updated>

		<published>2007-10-15T12:04:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76761#p76761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76761#p76761"/>
		<title type="html"><![CDATA[little problem.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76761#p76761"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>[21:03] &lt;|AmDeAtH&gt; .set errorInfo debug[21:03] &lt;Cricket`-&gt; [21:03] #iamdeath# set errorInfo debug[21:03] &lt;Cricket`-&gt; Ok, set.[21:03] &lt;Cricket`-&gt; [21:03] Tcl error [nextmatch]: syntax error in expression "[gets $sock html] &gt;= "0" [21:03] &lt;Cricket`-&gt;  [string match -nocase "*&gt;Forecas...": extra tokens at end of expression</code></pre></div>Thats the error I get.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Mon Oct 15, 2007 12:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-10-15T11:36:30-04:00</updated>

		<published>2007-10-15T11:36:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76758#p76758</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76758#p76758"/>
		<title type="html"><![CDATA[little problem.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76758#p76758"><![CDATA[
Error msgs, specifically the .set errorInfo debug, would be helpful..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Oct 15, 2007 11:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-10-15T08:14:10-04:00</updated>

		<published>2007-10-15T08:14:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76754#p76754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76754#p76754"/>
		<title type="html"><![CDATA[little problem.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76754#p76754"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>   while {[gets $sock html] &gt;= "0"} {       if {[string match -nocase "*&lt;tr valign=top*&gt;*" $html] == "1"} {         set x "0"         set line ""         set color "$html"       } elseif {[string match -nocase "*&lt;td nowrap&gt;*" $html] == "1"} {         set line "${line}[lrange [gets $sock] 0 1] "           if {[incr x] &gt;= "2"} {           gets $sock html           gets $sock html           while {[gets $sock html] &gt;= "0"  [string match -nocase "*&gt;Forecast&lt;*" $html] == "0"} {             if {[string match -nocase "*&lt;br&gt;*" $html] == "1" || [string match -nocase "*&lt;/td&gt;*" $html] == "1"} {               regexp {.html"&gt;(.+)&lt;/a&gt;} $html match html               regexp {(.+)&lt;br&gt;} $html match html               regexp {(.+) &lt;/td&gt;} $html match html               set line "${line} ${html}."             }           }           nextmatch:line $nick $color $line         }         }     } </code></pre></div>I think here is the error, can you check what could possibily be wrong in that code, something here is missing:<br><div class="codebox"><p>Code: </p><pre><code>          while {[gets $sock html] &gt;= "0"  [string match -nocase "*&gt;Forecast&lt;*" $html] == "0"} { </code></pre></div>Could you guide me please.<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Mon Oct 15, 2007 8:14 am</p><hr />
]]></content>
	</entry>
	</feed>
