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

	<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>2005-02-10T04:22:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-02-10T04:22:33-04:00</updated>

		<published>2005-02-10T04:22:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46474#p46474</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46474#p46474"/>
		<title type="html"><![CDATA[Tcl script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46474#p46474"><![CDATA[
did you do <div class="codebox"><p>Code: </p><pre><code>!setcurrent playlistname</code></pre></div> after adding a playlist?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Thu Feb 10, 2005 4:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Vizionz]]></name></author>
		<updated>2005-02-10T03:47:33-04:00</updated>

		<published>2005-02-10T03:47:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46473#p46473</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46473#p46473"/>
		<title type="html"><![CDATA[Tcl script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46473#p46473"><![CDATA[
okay thanks guys. figured that out still dont understand how to call the script though.<br><br>if i  do like !playlist 1 it dont find anything or show anything <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5974">Vizionz</a> — Thu Feb 10, 2005 3:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2005-02-09T13:16:36-04:00</updated>

		<published>2005-02-09T13:16:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46455#p46455</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46455#p46455"/>
		<title type="html"><![CDATA[Re: Tcl script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46455#p46455"><![CDATA[
<blockquote class="uncited"><div>bind pub n !addpl appp<br>bind pub - !setcurrent scurr<br>bind pub - !playlist plsearch<br>^---- What do these mean is this something i need to do somewhere ?</div></blockquote><a href="http://www.egghelp.org/commands/core.htm#binds" class="postlink">Read all about BINDS</a>.<blockquote class="uncited"><div>and  if not  where does the Playlist Directory need to reside i added it in like three directories and one of them worked but not sure which one its actually in hehe.</div></blockquote>Do like ^Doom^ said, use the <strong class="text-strong">!addpl</strong> command to tell the bot where to store your playlist (obviously, you must be a global +n owner)...be sure you delete the other 2 playlists from the shell, to cut down on confusion as to which playlist is valid and which is not....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Wed Feb 09, 2005 1:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-02-09T07:14:26-04:00</updated>

		<published>2005-02-09T07:14:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46437#p46437</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46437#p46437"/>
		<title type="html"><![CDATA[Tcl script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46437#p46437"><![CDATA[
First of all the Binds are needed by the bot you dont need to do anything to them. they are just there to <span style="text-decoration:underline">BIND</span> a trigger like !playlist. So when someone types !playlist it checks against the binds and knows which procedure to run.<br><br>Secondly if you read the authors description at the top of the script you would of seen that it doesn't matter where you put the playlist as you tell the script where it is when you use !addpl.<br><blockquote class="uncited"><div>#than put it into a direcory (simple ~/playlists/playlist01.htm or what you whant)<br>#use !addpl Playlist1 ~/playlists/playlist01.html (be sure that you are bot owner) </div></blockquote>Hope this helps,<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Wed Feb 09, 2005 7:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Vizionz]]></name></author>
		<updated>2005-02-09T00:34:26-04:00</updated>

		<published>2005-02-09T00:34:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46431#p46431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46431#p46431"/>
		<title type="html"><![CDATA[Tcl script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46431#p46431"><![CDATA[
Alright i downloaded a script here that  Scans for playlists<br>well okay i added it and its on the web but i dont understand how it actually works...<br><br><a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1076" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1076</a><br>there the actual download<br><div class="codebox"><p>Code: </p><pre><code>#playlist scan by #@homer#version 0.5#email fkhg1@web.de (reason scriptname.tcl)#icq 92566354#simple make a playlist of all your mp3's or what you whant#than put it into a direcory (simple ~/playlists/playlist01.htm or what you whant)#use !addpl Playlist1 ~/playlists/playlist01.html (be sure that you are bot owner)#if you whant to donate me paypal: fkhg1@web.de#if you have any problems with the script just visit me#my homepage www.homer-im-bett.de.vu##i have made this script for the radio #dynamix in irc.quakenet.org www.rautedynamix.de#if you have any good ideas what i can code just visit me :D i have a lot of time ^^#copyright 2004 homer^im^bett Florian K.bind pub n !addpl apppbind pub - !setcurrent scurrbind pub - !playlist plsearch#do not change or ripp anything under this line:#-----------------------------------------------proc searchlist {listname nick strings} {if {![file exists $listname]} {putserv "NOTICE $nick :Playlist Not Found"varin ~/stream.txt scan noreturn noplaylist}if {[file exists $listname]} {set fs [open $listname r]set found 0regsub -all " " $strings "*" blagets $fs pointwhile {![eof $fs]} {if {[string match -nocase "*$bla*" $point]} {incr foundset output($found) $point}gets $fs point}close $fsif {$found == 0} {putserv "NOTICE $nick :nothing found!!!"varin ~/stream.txt scan noreturn found0}if {$found &lt;= 5} {set afound 1while {$afound &lt;= $found} {regsub -all "&lt;BR&gt;" $output($afound) "" textregsub -all "&lt;br&gt;" $text "" textputhelp "NOTICE $nick :$afound / $found found: $text"incr afound}varin ~/stream.txt scan noreturn afterwhile}if {$found &gt;= 5} {putserv "NOTICE $nick :too many matches ($found) show the first 5 matches"set afound 1while {$afound &lt;= 5} {regsub -all "&lt;BR&gt;" $output($afound) "" textregsub -all "&lt;br&gt;" $text "" textputhelp "NOTICE $nick :$afound / $found found: $text"incr afound}}}varin ~/stream.txt scan no}proc appp {nick host handle chan text} {if {$text == ""} {putserv "NOTICE $nick :Syntax: !addpl NAME OF HTML PLAYLIST ~/playlists/XXXXX.html \"!addpl play01 ~/playlists/play01.html\""return help}addpl $nick [lindex $text 0] [lindex $text 1] $chan }proc addpl { nick plname pl chan } {if {![file exists $pl]} {putserv "NOTICE $nick :PlayList Not Found"return noplaylist}if {[file exists $pl]} {varin ~/playlists.txt $plname $plputserv "NOTICE $nick :playlist saved as: $plname"putserv "PRIVMSG $chan :playlist: $pl : $nick name: $plname"return everythingdone}}proc scurr {nick host handle chan text} {if {[lindex $text 0] == ""} {putserv "NOTICE $nick :!setcurrent playlistname"return 0}if {![file exists [varout ~/playlists.txt [lindex $text 0]]]} {putserv "PRIVMSG $chan :playlist not in list"return 1}if {[varout ~/playlists.txt [lindex $text 0]] == "0"} {putserv "PRIVMSG $chan :playlist not in list"return 2}if {[varout ~/playlists.txt [lindex $text 0]] != "0"} {varin ~/stream.txt current [varout ~/playlists.txt [lindex $text 0]]varin ~/stream.txt curpl [lindex $text 0]putserv "PRIVMSG $chan :playlist set to: [varout ~/playlists.txt [lindex $text 0]]"return 10000}}proc plsearch {nick host handle chan text} {if {[varout ~/stream.txt curpl] == 0} {putserv "NOTICE $nick :Playlist not loadet"return nopl}if {[varout ~/stream.txt current] == 0} {putserv "NOTICE $nick :Playlist not loadet"return nopl}if {[varout ~/stream.txt scan] == "scan"} {putserv "NOTICE $nick :Please wait"return already}if {$text == ""} {putserv "NOTICE $nick :syntax: !playlist string to search"return 0}if {[llength [split $text ""]] &lt;= 2} {putserv "NOTICE $nick :string to short must be longer than 3 letters"return 2short}varin ~/stream.txt scan scanputserv "NOTICE $nick :Scanning playlist: [varout ~/stream.txt curpl]"searchlist [varout ~/stream.txt current] $nick [lrange $text 0 end]return 0}##### one piece of my var.tcl normal it is very big if you whant it contact me in irc.quakenet.org #@homer ######copyright 2004 homer^im^bett Florian K.#do not change or ripp anything under this line:#-----------------------------------------------proc varin {storeplace var text} {if {![file exists $storeplace]} {set fs [open $storeplace w]puts $fs ""close $fs}set change 0set fs [open $storeplace r]set tmpfs [open $storeplace.tmp w]while {![eof $fs]} {gets $fs lineif {[lindex $line 0] != $var &amp;&amp; [lindex $line 0] != ""} {puts $tmpfs "$line"}if {[lindex $line 0] == $var} {puts $tmpfs "$var [lrange $text 0 end]"set change 1}}if {!$change} {puts $tmpfs "$var [lrange $text 0 end]"}close $fsclose $tmpfsset fs [open $storeplace.tmp r]set grrr "[read $fs]"close $fsset fs [open $storeplace w]puts $fs "$grrr"close $fsreturn 0}proc varout {storeplace var} {if {![file exists $storeplace]} {return file!exists}set fs [open $storeplace r]set varX 0set ende 0while {![eof $fs] || !$ende} {gets $fs lineif {[lindex $line 0] == $var} {close $fsreturn [lrange $line 1 end]set varX [lrange $line 1 end]set ende 1}if {$line == ""} {close $fsreturn 0}}close $fsreturn $varX}</code></pre></div>now theres the actual coding within the tcl<br><br>now my real question is how does it work?<br><br><br>bind pub n !addpl appp<br>bind pub - !setcurrent scurr<br>bind pub - !playlist plsearch<br>^---- What do these mean is this something i need to do somewhere ?<br><br>and  if not  where does the Playlist Directory need to reside i added it in like three directories and one of them worked but not sure which one its actually in hehe.<br><br>but  my real problem is  what use is this.  when i try to search like !playlist name  it keeps saying not loadet so obviousely something is wrong can anyone help  with how this actually works and the right steps to get it running ...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5974">Vizionz</a> — Wed Feb 09, 2005 12:34 am</p><hr />
]]></content>
	</entry>
	</feed>
