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

	<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>2014-02-23T00:50:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[bunnybump]]></name></author>
		<updated>2014-02-23T00:50:22-04:00</updated>

		<published>2014-02-23T00:50:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102605#p102605</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102605#p102605"/>
		<title type="html"><![CDATA[Re: Full tcl script with duration...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102605#p102605"><![CDATA[
<blockquote class="uncited"><div><a href="http://forum.egghelp.org/viewtopic.php?t=19596" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19596</a></div></blockquote>regarding to WazzUK posted, i got this error when i tried to run it on my eggdrop. i've try this tcl but it keeps telling me that there's an error with the script. here what i got:<br><div class="codebox"><p>Code: </p><pre><code> can't read "maxlen": no such variable    while executing"string is integer -strict $maxlen"    invoked from within"if  {[string is integer -strict $maxlen]} {           if {($maxlen == "") || ($maxlen &lt; 1)} {set maxlen 100}        } else { set maxlen "100" }"    (file "scripts/you.tcl" line 50)</code></pre></div>what should i do to fix it? thank you in advance for the help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12060">bunnybump</a> — Sun Feb 23, 2014 12:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[WazzaUK]]></name></author>
		<updated>2014-01-29T16:58:17-04:00</updated>

		<published>2014-01-29T16:58:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102563#p102563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102563#p102563"/>
		<title type="html"><![CDATA[Full tcl script with duration...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102563#p102563"><![CDATA[
<a href="http://forum.egghelp.org/viewtopic.php?t=19596" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19596</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7928">WazzaUK</a> — Wed Jan 29, 2014 4:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SoUkSoU]]></name></author>
		<updated>2014-01-14T12:06:02-04:00</updated>

		<published>2014-01-14T12:06:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102489#p102489</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102489#p102489"/>
		<title type="html"><![CDATA[Hey]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102489#p102489"><![CDATA[
Can you provide the full tcl with the duration in it ?<br><br>Regards,<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12328">SoUkSoU</a> — Tue Jan 14, 2014 12:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[WazzaUK]]></name></author>
		<updated>2013-12-31T01:40:34-04:00</updated>

		<published>2013-12-31T01:40:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102428#p102428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102428#p102428"/>
		<title type="html"><![CDATA[Duration for Youtube]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102428#p102428"><![CDATA[
Only just realised the previous code i provided doesnt work. Get invalid variable type for use with expr and +.<br><br>$data is http data, after proc completes $duration contains the duration.<br><br>Im sure the following code works, i use it in my youtube script.<br><div class="codebox"><p>Code: </p><pre><code>if {[regexp -nocase {&lt;meta itemprop=\"duration\" content=\"(.*?)\"&gt;.*} $data match duration]} {  set youtubelength $duration   if {[regexp {M(.*?)S} $duration match duration]} {     set videosecs $duration  }   set duration $youtubelength   if {[regexp {PT(.*?)M} $duration match duration]} {     set videomins $duration  } set totalseconds [expr {($videomins * 60) + $videosecs}]           set duration [clock format $totalseconds -format {%H:%M:%S}] }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7928">WazzaUK</a> — Tue Dec 31, 2013 1:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[WazzaUK]]></name></author>
		<updated>2013-09-03T07:54:54-04:00</updated>

		<published>2013-09-03T07:54:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102015#p102015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102015#p102015"/>
		<title type="html"><![CDATA[Youtube tcl - duration option]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102015#p102015"><![CDATA[
Heres an improved version... i know the code is a touch messy...  Previous code wasnt 100% depending on the data from youtube...<br><div class="codebox"><p>Code: </p><pre><code>if {[regexp -nocase {&lt;meta itemprop=\"duration\" content=\"(.*?)\"&gt;.*} $youtubevar match youtubeduration]} {  set youtubelength $youtubeduration  if {[regexp {M(.*?)S} $youtubevar match youtubeduration]} {    set videosecs $youtubeduration  }  set youtubeduration $youtubelength  if {[regexp {PT(.*?)M} $youtubevar match youtubeduration]} {    set videomins $youtubeduration  }  set totalseconds [expr {($videomins * 60) + $videosecs}]   set youtubeduration [clock format $totalseconds -format {%H:%M:%S}]}</code></pre></div>Ive re-written most of original code - has much more info and functionality...<br><br>YouTube URL check v1.01 by WazzaUK - based on v.0.01 by <strong class="text-strong">Ford_Lawnmower</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7928">WazzaUK</a> — Tue Sep 03, 2013 7:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[WazzaUK]]></name></author>
		<updated>2013-08-25T04:56:24-04:00</updated>

		<published>2013-08-25T04:56:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101999#p101999</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101999#p101999"/>
		<title type="html"><![CDATA[youtube video duration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101999#p101999"><![CDATA[
This should help:<br><br>$youtubevar is the current line of http data<br><div class="codebox"><p>Code: </p><pre><code>set youtubeduration ""if {[regexp -nocase {&lt;meta itemprop=\"duration\" content=\"(.*?)\"&gt;.*} $youtubevar match youtubeduration]} {  set youtubeduration "Duration: $youtubeduration"  set youtubeduration [string map [list {PT} {} {M} {:} {S} {}] $youtubeduration]}</code></pre></div>I know this works.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7928">WazzaUK</a> — Sun Aug 25, 2013 4:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ege]]></name></author>
		<updated>2013-07-27T00:46:05-04:00</updated>

		<published>2013-07-27T00:46:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101885#p101885</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101885#p101885"/>
		<title type="html"><![CDATA[Youtube tcl - duration option]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101885#p101885"><![CDATA[
hello,<br><br>i have this script by Ford_Lawnmower<br><br><a href="https://pastee.org/ht3t7" class="postlink">https://pastee.org/ht3t7</a><br><br>how to add youtube video duration time spec into it ?  <br><br>thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12266">ege</a> — Sat Jul 27, 2013 12:46 am</p><hr />
]]></content>
	</entry>
	</feed>
