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

	<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-11-30T07:31:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[moff]]></name></author>
		<updated>2008-11-30T07:31:16-04:00</updated>

		<published>2008-11-30T07:31:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86023#p86023</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86023#p86023"/>
		<title type="html"><![CDATA[discogs.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86023#p86023"><![CDATA[
dumb spammer<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10076">moff</a> — Sun Nov 30, 2008 7:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[moff]]></name></author>
		<updated>2008-11-15T21:34:56-04:00</updated>

		<published>2008-11-15T21:34:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85833#p85833</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85833#p85833"/>
		<title type="html"><![CDATA[discogs.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85833#p85833"><![CDATA[
im not a tcl prof but i know what to do if someone helps me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>are there any tcl freaks out there ?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10076">moff</a> — Sat Nov 15, 2008 9:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[moff]]></name></author>
		<updated>2008-10-12T17:47:40-04:00</updated>

		<published>2008-10-12T17:47:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85515#p85515</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85515#p85515"/>
		<title type="html"><![CDATA[discogs.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85515#p85515"><![CDATA[
Hi guys,<br><br>i just found the discogs.tcl script by erupt but it doesnt work properly...<br>i always get "nothing found"<br>and i think the guy who did it, is inactive...<br><br>anyone know what to do?<br><br><br><div class="codebox"><p>Code: </p><pre><code># Discogs.com Query Script## Description: Queries Discogs.com for Music info## Features: Allows you to search by artist/label/release## Author: eRUPT(erupt@ruptbot.com) / Web: www.ruptbot.com## Usage: call !disco [options] &lt;search terms&gt;# Options: -t &lt;search type&gt; -c# &lt;limit results&gt; -i &lt;release number&gt; -p (Private)# Search Types: art, rel, cat, lab# Tips: When you find releases through the bot use the Release Number#       (Located at the end of the URL) to query for further details #on the album.#        #Allow guest queries to show in channel? [0=No,1=Yes]set discogs(private) 0#Max number of resultsset discogs(MAX) 10set discogs(ver) v0.3############ History## - v0.1#   First Release.## - v0.1b#   Fixed exact matches that try to redirect.## - v0.1c#   Fixed putnot error.## - v0.2#   Rewrote search patterns for new discogs html.## - v0.3#   Rewrote search patterns for new discogs html.###########bind pub -|- !disco pub_discogsproc putnot {nick msg} { putserv "NOTICE $nick :$msg" }proc get_discogs {private where nick max type args} {  global tokens  package require http  regsub -all " " $args "+" args  if {[string equal {i} $type]} {    set conn [http::geturl http://www.discogs.com/release/[lindex $args 0] -command spit_discogs]  } else {    set conn [http::geturl http://www.discogs.com/search?type=$type&amp;q=[lindex $args 0]&amp;btn=Search -command spit_discogs]  }  set tokens($conn) "$private $where $nick $max $type [unixtime]"}proc spit_discogs {token} {  global tokens testBody  set private [lindex $tokens($token) 0]  set where [lindex $tokens($token) 1]  set max [lindex $tokens($token) 3]  set type [lindex $tokens($token) 4]  set unixtime [lindex $tokens($token) 5]  unset tokens($token)  upvar #0 $token http  set testBody $http(body)  if {$http(status)=="error"} {    if {$http(error)!=""} {      putserv  "$private $where :Error: $http(error)"      return 0    }  }  if {$http(status)=="timeout"} {    putserv "$private $where :Error: Timeout."    return 0  }  array set meta $http(meta)  if {[info exists meta(Location)]} {    set title [lindex [split $meta(Location) /] 2]    set entry_type [lindex [split $meta(Location) /] 1]    putserv "$private $where :(\002$entry_type\002) $title - \002http://www.discogs.com$meta(Location)\002"    return 1  }  catch {  set cnt 0  if {![string equal {i} $type]} {  regsub -all {&lt;/?b&gt;} $http(body) {} http(body)  set dupes [list {}]  foreach index [regexp -all -indices -inline {&lt;li&gt;&lt;a href=[^&gt;]+&gt;&lt;span[^&gt;]*&gt;[^&lt;]*&lt;/span&gt;&lt;/a&gt;} $http(body)] {    if {$cnt==$max} { break }    set disco_entry [string range $http(body) [lindex $index 0] [lindex $index 1]]    regexp {href="([^"]+)"&gt;&lt;span[^&gt;]*&gt;(.*?)&lt;/span&gt;&lt;/a&gt;} $disco_entry {} url title    if {[info exists title]} { set title [string map {{+} { }} $title] } else { set title " " }    if {![info exists entry_type]} { set entry_type $type }    if {[lsearch -exact $dupes "$title $url"]==-1} {    putserv "$private $where :(\002$entry_type\002) $title - \002http://www.discogs.com$url\002"lappend dupes "$title $url"incr cnt    }  }  } else {    set testBody $http(body)    regsub -all {\n} $http(body) {} http(body)    foreach desc_type {Catalog# Format Country Released Genre Style} { append regex "&lt;tr&gt;&lt;td align=right&gt;$desc_type:&lt;/td&gt;&lt;td&gt;(\[^&lt;\]*)&lt;/td&gt;&lt;/tr&gt;" }    regexp {&lt;td colspan=2&gt;&lt;font size=4&gt;&lt;b&gt;.*?&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;} $http(body) match    set match [string map {&lt;/a&gt;- { -}} $match]    regsub -all {&lt;[^&gt;]*&gt;|\n} $match {} title    foreach desc_type {Catalog# Format Country Released Genre Style} {      set regex "&lt;tr&gt;&lt;td align=right&gt;$desc_type:&lt;/td&gt;&lt;td&gt;(\[^&lt;\]*)&lt;/td&gt;&lt;/tr&gt;"      if {[regexp $regex $http(body) {} current]} {if {![string equal {} $current]} {  if {[string equal {0} $cnt]} {    putserv "$private $where :\002$title\002"    incr cnt  }  putserv "$private $where :$desc_type: \002$current\002"}      }    }  }  if {$cnt==0} {    putserv "$private $where :No Results"  }  } err  if {$err!=""} { putlog "Discogs Error: $err" }}proc pub_discogs {nick uhost hand chan arg} {  global discogs tokens  array set types {art {artists} rel {releases} cat {catno} lab {labels}}  if {[string equal {} $arg]} {    putnot $nick "Usage: !disco \[options\] &lt;search terms&gt;"    putnot $nick "Flags: -t &lt;search type&gt; -c# (limit results) -i &lt;release number&gt; -p (Forces private messaging)"    putnot $nick "Search Types: art, rel, cat, lab"    return 0  }  set private 0  if {$discogs(private) &amp;&amp; [string equal {*} $hand]} { set private 1 }  if {[set index [lsearch -exact $arg -p]]!="-1"} {    set private 1    set arg [lreplace $arg $index $index]  }  set type "All"  if {[set index [lsearch -exact $arg -t]]!="-1"} {    set type $types([lindex $arg [expr $index + 1]])    set arg [lreplace $arg $index [expr $index + 1]]  }  if {[set index [lsearch -exact $arg -i]]!="-1"} {    set type "i"    set arg [lreplace $arg $index $index]  }  set max $discogs(MAX)  if {[set index [lsearch -regexp $arg {-c[0-9]+}]]!="-1"} {    regexp {[0-9]+} [lindex $arg $index] max    set arg [lreplace $arg $index $index]  }  if {$max&gt;$discogs(MAX)} { set max $discogs(MAX) }  foreach array [array names tokens] {    if {$nick==[lindex $tokens($array) 2]} {      if {[expr [unixtime] - [lindex $tokens($array) 5]]&gt;300} {        unset tokens($array)      } else {          putnot $nick "You already have one query open wait a couple, or better yet goto a record store."          return 0        }    }  }  if {$private} {    get_discogs NOTICE $nick $nick $max $type $arg  } else {      get_discogs PRIVMSG $chan $nick $max $type $arg    }  return 1}putlog "Discogs.com Query Tools for eggdrop by eRUPT(erupt@ruptbot.com) $discogs(ver)"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10076">moff</a> — Sun Oct 12, 2008 5:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
