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

	<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-02-21T19:32:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-21T19:32:20-04:00</updated>

		<published>2007-02-21T19:32:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70617#p70617</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70617#p70617"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70617#p70617"><![CDATA[
That's because I posted an example proc, it's up to you to use the parts you need. You don't need the entire proc or the bind for it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Feb 21, 2007 7:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ladykiller]]></name></author>
		<updated>2007-02-21T18:41:36-04:00</updated>

		<published>2007-02-21T18:41:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70616#p70616</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70616#p70616"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70616#p70616"><![CDATA[
Very nice. Thx to all for the nice help<br><br>Kind regards LK<br><br>edit: Grrmmmlll<br><br>Now i am sleepy<br><blockquote class="uncited"><div>bind PUB -|- ".charts" pub:mtv:charts<br><br>setudef flag charts<br><br>proc pub:mtv:charts { nickname hostname handle channel arguments } {<br><br>if { [info exists ::chartsdone($channel)] || ![channel get $channel charts] } {<br>return 0<br>}<br><br>package require http<br><br>set x [http::config -useragent "Mozilla"]<br>set x [http::geturl "<a href="http://www.mtv.de/hitlistgermany/index.php" class="postlink">http://www.mtv.de/hitlistgermany/index.php</a>" -timeout 2000]<br><br>set y [http::data $x]<br><br>http::cleanup $x<br><br>unset x<br>set   chartcurrent  0<br>set   chartlist     ""<br><br>foreach element [split $y \n] {<br><br>if { ![info exists preline] } {<br><br>if { [regexp {width=\"160\"} $element chartline] } {<br><br>set  preline       1<br><br>regsub -all -- {\&lt;(.*?)&gt;} $element "" element<br><br>append chartlist "$element "<br><br>continue<br><br>}<br><br>}<br><br>if { [info exists preline] } {<br><br>if { [regexp {width=\"163\"} $element chartline] } {<br><br>unset preline<br><br>incr chartcurrent<br><br>regsub -all -- {\&lt;(.*?)&gt;} $element "" element<br><br>append chartlist "- $element|"<br><br>if { $chartcurrent == 5 } {<br><br>break<br><br>}<br><br>continue<br><br>}<br><br>}<br><br>}<br><br>bind pub - test proctest <br>proc proctest {nick uhost hand chan text} { <br>        set x 0 <br>        set chartlist "foo | bar | biz | baz" <br>        if { $chartlist != "" } { <br>                foreach chart [split $chartlist "|"] { <br>                        if {$chart != ""} { <br>                                incr x <br>                                if {$x == 1} { <br>                                        puthelp "PRIVMSG $chan :GERMAN TOP5: $x\. $chart" <br>                                } else { <br>                                        puthelp "PRIVMSG $chan :$x\. $chart" <br>                                        continue <br>                                } <br>                        } <br>                } <br>        } <br>} <br><br><br><br><br>set ::chartsdone($channel) 1<br>utimer 10 [list unset ::chartsdone($channel)]<br><br>}</div></blockquote>is anything wrong in here ???<br><br>its not posting while using <strong class="text-strong">.charts</strong> and i cant find anything<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8718">Ladykiller</a> — Wed Feb 21, 2007 6:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-21T12:44:39-04:00</updated>

		<published>2007-02-21T12:44:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70604#p70604</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70604#p70604"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70604#p70604"><![CDATA[
Ahh, there's a few errors in my code, I musta been tired =)<br>I tested this, it worked. Modify to suit.<div class="codebox"><p>Code: </p><pre><code>bind pub - test proctestproc proctest {nick uhost hand chan text} {        set x 0        set chartlist "foo | bar | biz | baz"        if { $chartlist != "" } {                foreach chart [split $chartlist "|"] {                        if {$chart != ""} {                                incr x                                if {$x == 1} {                                        puthelp "PRIVMSG $chan :GERMAN TOP5: $x\. $chart"                                } else {                                        puthelp "PRIVMSG $chan :$x\. $chart"                                        continue                                }                        }                }        }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Feb 21, 2007 12:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ladykiller]]></name></author>
		<updated>2007-02-21T09:26:00-04:00</updated>

		<published>2007-02-21T09:26:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70600#p70600</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70600#p70600"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70600#p70600"><![CDATA[
<blockquote class="uncited"><div>Another way to do the same thing, more or less:<div class="codebox"><p>Code: </p><pre><code>set x 0if { $chart != "" } {    foreach chart [split $chartlist "|"] {          incr x 1          if {$x == 1} {                sendmsg $channel "GERMAN TOP5: $x\. $chart"}          } else {                sendmsg $channel "x\. $chart"                continue          }    }}</code></pre></div></div></blockquote>gives an Error<br><blockquote class="uncited"><div> ("foreach" body line 2)<br>invoked from within<br>"foreach script $neededscripts {<br> source scripts/priv/$script<br> }"<br>invoked from within</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8718">Ladykiller</a> — Wed Feb 21, 2007 9:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-20T20:54:25-04:00</updated>

		<published>2007-02-20T20:54:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70592#p70592</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70592#p70592"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70592#p70592"><![CDATA[
Another way to do the same thing, more or less:<div class="codebox"><p>Code: </p><pre><code>set x 0if { $chart != "" } {    foreach chart [split $chartlist "|"] {          incr x 1          if {$x == 1} {                sendmsg $channel "GERMAN TOP5: $x\. $chart"}          } else {                sendmsg $channel "x\. $chart"                continue          }    }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Feb 20, 2007 8:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-20T20:47:37-04:00</updated>

		<published>2007-02-20T20:47:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70591#p70591</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70591#p70591"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70591#p70591"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set x 0if { $chart != "" } {     sendmsg $channel "GERMAN TOP5:"     foreach chart [split $chartlist "|"] {           incr x 1           sendmsg $channel "$x\. $chart"           continue      }}</code></pre></div>That'll show the header "GERMAN TOP5:" by itself, then the actual chart stuff will be shown 1 line at a time after.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Feb 20, 2007 8:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ladykiller]]></name></author>
		<updated>2007-02-20T10:16:27-04:00</updated>

		<published>2007-02-20T10:16:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70578#p70578</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70578#p70578"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70578#p70578"><![CDATA[
Hi thanks for the help. I got it  now.<br><br>Bit different.<br><br><blockquote class="uncited"><div> foreach chart [split $chartlist "|"] { <br>      if { $chart != "" } { <br>         incr x <br>         sendmsg $channel "GERMAN TOP5" <strong class="text-strong">"$x\. $chart</strong>" <br>         continue <br>      } <br>   } </div></blockquote>otherwise u get a lil sendmsg error<br><br>Maybe u can help again. With this code i have on all 5 <strong class="text-strong">GERMAN TOP5</strong><br>Is it possible to change it that way that GERMAN TOP5 is just a topic an underneath the TOP5 listing?<br><br>Regards LK<br><br>edit: why does the Count starts now from 2 - 6 instead 1 - 5<br><br>edit. Grr so stupid <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">)<br><blockquote class="uncited"><div><strong class="text-strong">set x 0</strong><br><br> foreach chart [split $chartlist "|"] { <br> if { $chart != "" } { <br> <strong class="text-strong">incr x 1</strong><br> sendmsg $channel "GERMAN TOP5" "$x\. $chart" <br> continue <br> } <br>} </div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8718">Ladykiller</a> — Tue Feb 20, 2007 10:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-18T20:22:59-04:00</updated>

		<published>2007-02-18T20:22:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70538#p70538</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70538#p70538"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70538#p70538"><![CDATA[
Change:<div class="codebox"><p>Code: </p><pre><code> foreach chart [split $chartlist "|"] {      if { $chart != "" } {         lappend charts "\002$x.\002 $chart"         incr x         continue      }   }   sendmsg $channel "GERMAN TOP5" "[join $charts " | "]"</code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code> foreach chart [split $chartlist "|"] {      if { $chart != "" } {         incr x         sendmsg $channel "GERMAN TOP5 $x\. $charts"         continue      }   }</code></pre></div>Should work..  I don't know where the sendmsg thing comes from, I assume its a proc in a different script.. Otherwise, just use <br><br>puthelp "PRIVMSG $chan :GERMAN TOP5 $x\. $charts"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Feb 18, 2007 8:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ladykiller]]></name></author>
		<updated>2007-02-18T16:29:06-04:00</updated>

		<published>2007-02-18T16:29:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70532#p70532</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70532#p70532"/>
		<title type="html"><![CDATA[ChartScript wrong proc ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70532#p70532"><![CDATA[
I tried to load this lil Script but got an error and need some Help please to find it. Thanks in advance<br><br>Here is the Script<br><div class="codebox"><p>Code: </p><pre><code>bind PUB -|- ".charts" pub:mtv:chartssetudef flag chartsproc pub:mtv:charts { nickname hostname handle channel arguments } {if { [info exists ::chartsdone($channel)] || ![channel get $channel charts] } {return 0}package require httpset x [http::config -useragent "Mozilla"]set x [http::geturl "http://www.mtv.de/hitlistgermany/index.php" -timeout 2000]set y [http::data $x]http::cleanup $xunset xset   chartcurrent  0set   chartlist     ""foreach element [split $y \n] {if { ![info exists preline] } {if { [regexp {width=\"160\"} $element chartline] } {set  preline       1regsub -all -- {\&lt;(.*?)&gt;} $element "" elementappend chartlist "$element "continue}}if { [info exists preline] } {if { [regexp {width=\"163\"} $element chartline] } {unset prelineincr chartcurrentregsub -all -- {\&lt;(.*?)&gt;} $element "" elementappend chartlist "- $element|"if { $chartcurrent == 5 } {break}continue}}}set x 1foreach chart [split $chartlist "|"] {if { $chart != "" } {lappend charts "\002$x.\002 $chart"incr xcontinue}}sendmsg $channel "GERMAN TOP5" "[join $charts " | "]"set ::chartsdone($channel) 1utimer 10 [list unset ::chartsdone($channel)]}</code></pre></div>and thats the Error i get<br><blockquote class="uncited"><div>Tcl error [pub:mtv:charts]: can't read "chart": no such variable</div></blockquote>Regards LK<br><br><br>edit: solved the Prob. Found my glasses <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>another question. At the moment the output is like that<br><br><blockquote class="uncited"><div>« GERMAN TOP5 » «1. Herbert Groenemeyer - Lied 1- Stueck Vom Himmel | 2. Nelly Furtado - All Good Things (Come To An End) | 3. DJ Oetzi &amp; Nik P - Ein Stern (der Deinen Namen..) | 4. Ville Valo &amp; Natalia Avelon - Summer Wine | 5. Hoehner - Wenn Nicht Jetzt Wann Dann? »</div></blockquote>But i would like to have it this way<br><br><blockquote class="uncited"><div>]« GERMAN TOP5 » «1. Herbert Groenemeyer - Lied 1- Stueck Vom Himmel <br>2. Nelly Furtado - All Good Things (Come To An End) <br>3. DJ Oetzi &amp; Nik P - Ein Stern (der Deinen Namen..)<br>4. Ville Valo &amp; Natalia Avelon - Summer Wine <br>5. Hoehner - Wenn Nicht Jetzt Wann Dann? »</div></blockquote>Cant get it solved with \n<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8718">Ladykiller</a> — Sun Feb 18, 2007 4:29 pm</p><hr />
]]></content>
	</entry>
	</feed>
