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

	<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>2008-03-16T17:03:10-04:00</updated>

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

		<entry>
		<author><name><![CDATA[MellowB]]></name></author>
		<updated>2008-03-16T17:03:10-04:00</updated>

		<published>2008-03-16T17:03:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81827#p81827</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81827#p81827"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81827#p81827"><![CDATA[
<blockquote class="uncited"><div>... and when someone rewrites the script you posted, you think it will still be the same script?<br>If the one you have does not work, try another.</div></blockquote>You are not making much sense there, sorry.<br><blockquote class="uncited"><div><a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1375" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1375</a> is a nicely written script, but it's for looking up users, not artists.. It also no longer works, afaict, because the url within the script is no longer valid. </div></blockquote>I posted a working and updated version of that last.fm script here in the forums, just a few topics down.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9652">MellowB</a> — Sun Mar 16, 2008 5:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gordon]]></name></author>
		<updated>2008-03-13T09:35:47-04:00</updated>

		<published>2008-03-13T09:35:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81658#p81658</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81658#p81658"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81658#p81658"><![CDATA[
Very nice.<br><br>Good work!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8876">Gordon</a> — Thu Mar 13, 2008 9:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2008-03-13T08:18:34-04:00</updated>

		<published>2008-03-13T08:18:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81657#p81657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81657#p81657"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81657#p81657"><![CDATA[
<a href="http://members.dandy.net/~fbn/lastfm-artist.tcl.txt" class="postlink">http://members.dandy.net/~fbn/lastfm-artist.tcl.txt</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Mar 13, 2008 8:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2008-03-12T19:19:39-04:00</updated>

		<published>2008-03-12T19:19:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81645#p81645</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81645#p81645"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81645#p81645"><![CDATA[
<a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1375" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1375</a> is a nicely written script, but it's for looking up users, not artists.. It also no longer works, afaict, because the url within the script is no longer valid.<br><br>I only found 1 other lastfm script for "Somafm" in the egghelp archives, so yeah I guess I'll throw this little script together, it's simple and seems somewhat useful.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Mar 12, 2008 7:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2008-03-12T09:39:44-04:00</updated>

		<published>2008-03-12T09:39:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81639#p81639</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81639#p81639"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81639#p81639"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>I do not know why people do not look in the archive, <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1375" class="postlink"><span style="text-decoration:underline">this script</span></a> is VERY easy to find (and it includes author contact information).</div></blockquote>But thats a completely different script.</div></blockquote>... and when someone rewrites the script you posted, you think it will still be the same script?<br>If the one you have does not work, try another.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Wed Mar 12, 2008 9:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MellowB]]></name></author>
		<updated>2008-03-12T06:46:13-04:00</updated>

		<published>2008-03-12T06:46:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81638#p81638</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81638#p81638"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81638#p81638"><![CDATA[
<blockquote class="uncited"><div>I do not know why people do not look in the archive, <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1375" class="postlink"><span style="text-decoration:underline">this script</span></a> is VERY easy to find (and it includes author contact information).</div></blockquote>But thats a completely different script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9652">MellowB</a> — Wed Mar 12, 2008 6:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2008-03-11T10:58:40-04:00</updated>

		<published>2008-03-11T10:58:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81621#p81621</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81621#p81621"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81621#p81621"><![CDATA[
I do not know why people do not look in the archive, <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1375" class="postlink"><span style="text-decoration:underline">this script</span></a> is VERY easy to find (and it includes author contact information).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Tue Mar 11, 2008 10:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2008-03-11T04:35:19-04:00</updated>

		<published>2008-03-11T04:35:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81618#p81618</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81618#p81618"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81618#p81618"><![CDATA[
Easier to re-write it (and use package http, instead of the external lynx binary) and proper regexp's. I'll put it on my todo list. If I get a spurt of ambition I might write it by the weekend.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Mar 11, 2008 4:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gordon]]></name></author>
		<updated>2008-03-11T08:48:19-04:00</updated>

		<published>2008-03-10T21:01:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81613#p81613</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81613#p81613"/>
		<title type="html"><![CDATA[Lastfm script not fully working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81613#p81613"><![CDATA[
Could someone look at this and eventually fix it? (Problem with 'top track')<br><blockquote class="uncited"><div>(Gordon) !lastfm metallica<br>(b0t) <strong class="text-strong">[</strong>last.fm<strong class="text-strong">]</strong> metallica -&gt; listeners: 839,286<br>(b0t) <strong class="text-strong">[</strong>last.fm<strong class="text-strong">]</strong> top track (last week): n/a<br>(b0t) <strong class="text-strong">[</strong>last.fm<strong class="text-strong">]</strong> top track (last six months): n/a</div></blockquote><div class="codebox"><p>Code: </p><pre><code># last.fm check v1.0 by casn_## checks last.fm for listeners and top track on a given# artist name. since the listeners are higher on a serious and# (kinda) famous musicians (on last.fm are mostly music entusiasts9# are higher, you get a rating capability like imdb for movies.## requirements:# o lynx### just config below and let's go ;&lt;## your triggerset last(trig) "!lastfm"# path to your lynx dump fileset last(dump) "/home/luser/eggdrop/lynx.dump"# chan to useset last(chan) "#a-lame-chan"# actual last.fm url to use (don't touch it!)set last(url) "http://www.last.fm/music/"# output line startset last(lay) "\002\[\002last\002.\002fm\002\]\002 "#########################################################################bind pub - $last(trig) last_getset last(debug) 0proc last_get {nick host hand chan arg} {global lastputlog "last.fm script triggered"if {$chan != $last(chan)} {return}if {[string length $arg] &lt; 1} {puthelp "PRIVMSG $chan :usage: !lastfm &lt;artist&gt;"}set state 0if {$last(debug) == 1} {putlog "state == 0"}set listeners "n/a"set top_week "n/a"set top_six "n/a"set suburl [string map {" " "%20"} $arg]exec lynx --dump $last(url)$suburl &gt; $last(dump)set fp [open $last(dump) r]while {![eof $fp]} {gets $fp lineif {[string match *listeners* $line]} {set listeners [lindex $line 0]}if {$state == 1 &amp;&amp; [lindex $line 0] == "1"} {regexp -indices {(?i)\]} $line locationset top_week [string range $line [expr [lindex $location 0] + 1] end]set state 2if {$last(debug) == 1} {putlog "state == 2"}}if {[string match "*Top Tracks (last week)*" $line] &amp;&amp; $state == 0} {set state 1if {$last(debug) == 1} {putlog "state == 1"}}if {$state == 3 &amp;&amp; [lindex $line 0] == "1"} {regexp -indices {(?i)\]} $line locationset top_six [string range $line [expr [lindex $location 0] + 1] end]set state 4if {$last(debug) == 1} {putlog "state == 4"}}if {[string match "*Top Tracks (last six months)*" $line] &amp;&amp; $state == 2} {set state 3if {$last(debug) == 1} {putlog "state == 3"}}}close $fpif {$listeners == "n/a"} {puthelp "PRIVMSG $chan :$last(lay)[string tolower $arg] \002-&gt;\002 \0034not found\003\002.\002"return}puthelp "PRIVMSG $chan :$last(lay)[string tolower $arg] \002-&gt;\002 listeners: $listeners"puthelp "PRIVMSG $chan :$last(lay)top track \002(\002last week\002):\002 [string tolower $top_week]"puthelp "PRIVMSG $chan :$last(lay)top track \002(\002last six months\002):\002 [string tolower $top_six]"}putlog "last.fm check by casn_ started."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8876">Gordon</a> — Mon Mar 10, 2008 9:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
