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

	<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>2020-08-10T17:23:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-10T17:23:43-04:00</updated>

		<published>2020-08-10T17:23:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108858#p108858</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108858#p108858"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108858#p108858"><![CDATA[
for some reason on a particular box i cant get m00nies YT tcl  to output in utf-8<br>while : .tcl encoding system<br>shows : Tcl: utf-8<br>im puzzled what else to try<br><br>eggdrop v1.8.4<br>Tcl library: /usr/share/tcltk/tcl8.6<br>Tcl version: 8.6.10 (header version 8.6.10)<br>Tcl is threaded<br>TLS support is enabled<br>TLS library: OpenSSL 1.1.1f  31 Mar 2020<br><br><br><br><br><br>for locale this is what we have:<br><br>LANG=en_US.UTF-8<br>LANGUAGE=<br>LC_CTYPE="en_US.UTF-8"<br>LC_NUMERIC="en_US.UTF-8"<br>LC_TIME="en_US.UTF-8"<br>LC_COLLATE="en_US.UTF-8"<br>LC_MONETARY="en_US.UTF-8"<br>LC_MESSAGES="en_US.UTF-8"<br>LC_PAPER="en_US.UTF-8"<br>LC_NAME="en_US.UTF-8"<br>LC_ADDRESS="en_US.UTF-8"<br>LC_TELEPHONE="en_US.UTF-8"<br>LC_MEASUREMENT="en_US.UTF-8"<br>LC_IDENTIFICATION="en_US.UTF-8"<br>LC_ALL=<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Aug 10, 2020 5:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bugme]]></name></author>
		<updated>2020-06-18T16:42:01-04:00</updated>

		<published>2020-06-18T16:42:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108578#p108578</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108578#p108578"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108578#p108578"><![CDATA[
<blockquote class="uncited"><div>Hi bugme<br> default encoding is on your OS.<br>m00nie</div></blockquote>Yes. You're right<br>I use docker container. I forgot to check locale<br><div class="codebox"><p>Code: </p><pre><code>localeLANG=LANGUAGE=LC_CTYPE="POSIX"LC_NUMERIC="POSIX"LC_TIME="POSIX"LC_COLLATE="POSIX"LC_MONETARY="POSIX"LC_MESSAGES="POSIX"LC_PAPER="POSIX"LC_NAME="POSIX"LC_ADDRESS="POSIX"LC_TELEPHONE="POSIX"LC_MEASUREMENT="POSIX"LC_IDENTIFICATION="POSIX"LC_ALL=</code></pre></div>Updated Dockerfile. Problem solved. Thanks for the tip<br><br><br>p.s.<br>It is strange that this script does not have this problem, even with non-update locale <a href="http://forum.egghelp.org/viewtopic.php?p=108565#108565" class="postlink">http://forum.egghelp.org/viewtopic.php?p=108565#108565</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12668">bugme</a> — Thu Jun 18, 2020 4:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m00nie]]></name></author>
		<updated>2020-06-18T15:44:57-04:00</updated>

		<published>2020-06-18T15:44:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108577#p108577</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108577#p108577"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108577#p108577"><![CDATA[
Hi bugme<br><br>I think you might need to check your bot is compiled with UTF-8 support or what the default encoding is on your OS. I had to recompile some of my older hosted bots to get UTF-8 working properly<br>Cheers<br><br>m00nie<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12857">m00nie</a> — Thu Jun 18, 2020 3:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-06-16T08:11:35-04:00</updated>

		<published>2020-06-16T08:11:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108567#p108567</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108567#p108567"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108567#p108567"><![CDATA[
works fine for me with any lang<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Jun 16, 2020 8:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bugme]]></name></author>
		<updated>2020-06-16T02:53:25-04:00</updated>

		<published>2020-06-16T02:53:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108566#p108566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108566#p108566"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108566#p108566"><![CDATA[
I can see some problems with the code page with non-English names.<br><br>example: <a href="https://www.youtube.com/watch?v=YcaWvpYt7oI" class="postlink">https://www.youtube.com/watch?v=YcaWvpYt7oI</a><br><br>m00nie-youtube.2.4.tcl<br>result: <div class="codebox"><p>Code: </p><pre><code>GJ8Þó ,40q Á&amp;#139;_n -Mè-��#GJ8Þó #á</code></pre></div>expected result: <div class="codebox"><p>Code: </p><pre><code>GJ8マン 第40話 『私、見たの！ -前編-』　#GJ8マン #郡上八幡 #さくらももこ</code></pre></div><blockquote class="uncited"><div>debian:bullsey<br>eggdrop 1.8.4<br>tcl 8.6.9<br>tcl-tls 1.7.21<br>tclcurl 7.22.0+hg20160822-2<br>tcllib 1.20</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12668">bugme</a> — Tue Jun 16, 2020 2:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-05-19T09:43:44-04:00</updated>

		<published>2020-05-19T09:43:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108422#p108422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108422#p108422"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108422#p108422"><![CDATA[
hey there m00nie i loaded your youtube tcl 2.4 in tcl pastebin and it returned a few errors <br><blockquote class="uncited"><div>Line 36: ERROR: Unknown variable "m00nie::youtube::regex"<br>Line 40: ERROR: Unknown variable "m00nie::youtube::key"<br>Line 79: ERROR: Unknown variable "m00nie::youtube::user_throt"<br>Line 80: ERROR: Unknown variable "m00nie::youtube::chan_throt"<br>Line 81: ERROR: Unknown variable "m00nie::youtube::link_throt"<br>Line 89: NOTICE: Found constant "rawpage" which is also a variable.<br>Line 93: WARNING: Unknown command "json::json2dict"<br>Line 105: ERROR: Unknown variable "m00nie::youtube::key"<br></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue May 19, 2020 9:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m00nie]]></name></author>
		<updated>2020-05-19T03:41:51-04:00</updated>

		<published>2020-05-19T03:41:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108421#p108421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108421#p108421"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108421#p108421"><![CDATA[
Hi Caesar <img alt="☺️" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/263a.svg"><br><br>Thanks for the spot on the date being red incorrectly.ive updated the script to sort this along with your suggestion of the string maps (which I've never used before now so nice to learn something cleaner <img alt="😁" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f601.svg">)<br>The change that broke the script though is the API now randomly(?) seems to append a single Z rather than the expected .000Z we got before (something to do with recommend way to pass time in C+)<br>v2.4 should hopefully fix both probs <br>Cheers<br><br>m00nie<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12857">m00nie</a> — Tue May 19, 2020 3:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-05-18T01:28:21-04:00</updated>

		<published>2020-05-18T01:28:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108419#p108419</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108419#p108419"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108419#p108419"><![CDATA[
I looked on the website at comments section and saw an output from YouTube's API:<div class="codebox"><p>Code: </p><pre><code>[14:53:42] m00nie::youtube::getinfo IDS are {snippet {publishedAt 2015-08-10T22:24:25.000Z title {IFC's VICE Parody: 'DRONEZ' (Full Episode)} channelTitle VICE} contentDetails {duration PT22M52S} statistics {viewCount 36205}}</code></pre></div>and notice the 'publishedAt' is 2015-08-10T22:24:25.000Z<br><br>Those two lines I was puzzled about:<div class="codebox"><p>Code: </p><pre><code>regsub {\.000Z} $pubiso "" pubisoregsub -all {Z} $pubiso "" pubiso </code></pre></div>do this:<div class="codebox"><p>Code: </p><pre><code>% set pubiso "2015-08-10T22:24:25.000Z"2015-08-10T22:24:25.000Z% regsub {\.000Z} $pubiso "" pubiso1% regsub -all {Z} $pubiso "" pubiso0% puts $pubiso2015-08-10T22:24:25% clock format [clock scan $pubiso]Tue Aug 11 08:24:25 EEST 2015</code></pre></div>From here I notice two things:<br><br>1. The presence of the T in the $pubiso<br>2. The 'clock format' output is WRONG because the '2015-08-10 22:24:25' (notice that i just removed the T) becomes 'Tue Aug 11 08:24:25 EEST 2015' after 'clock format'<br><br>I would just ditch those 'regsub' lines and just use 'string map' instead:<div class="codebox"><p>Code: </p><pre><code>set pubiso [string map {"T" " " ".000Z" ""} $pubiso]</code></pre></div>while keeping the original:<div class="codebox"><p>Code: </p><pre><code>set pubtime [clock format [clock scan $pubiso]]</code></pre></div>and thus ignoring my previous fix. The output is clean as it should be:<div class="codebox"><p>Code: </p><pre><code>% set pubiso "2015-08-10T22:24:25.000Z"2015-08-10T22:24:25.000Z% set pubiso [string map {"T" " " ".000Z" ""} $pubiso]2015-08-10 22:24:25</code></pre></div>so this means that after 'clock format' the formatted date is correct:<div class="codebox"><p>Code: </p><pre><code>% clock format [clock scan $pubiso]Mon Aug 10 22:24:25 EEST 2015</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon May 18, 2020 1:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2020-05-17T12:45:36-04:00</updated>

		<published>2020-05-17T12:45:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108418#p108418</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108418#p108418"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108418#p108418"><![CDATA[
Oh, I did not check either.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br>Thanks to everyone!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Sun May 17, 2020 12:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-05-17T11:40:59-04:00</updated>

		<published>2020-05-17T11:40:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108417#p108417</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108417#p108417"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108417#p108417"><![CDATA[
in all fairness i must comment that m00nie seems to already have fixed that bug in his latest release as i didnt check his latest release i just did <br>just wanted to say this but none the less thx caesar for providing a quick fix<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 17, 2020 11:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-05-17T11:14:58-04:00</updated>

		<published>2020-05-17T11:14:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108416#p108416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108416#p108416"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108416#p108416"><![CDATA[
excellent that seems to do it caesar tnx for the swift reply and fix<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 17, 2020 11:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-05-17T10:30:32-04:00</updated>

		<published>2020-05-17T10:30:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108414#p108414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108414#p108414"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108414#p108414"><![CDATA[
Not sure what this 2 lines<div class="codebox"><p>Code: </p><pre><code>regsub {\.000Z} $pubiso "" pubisoregsub -all {Z} $pubiso "" pubiso</code></pre></div>are supposed to do since don't have the code running and can only guess..<br><br>Anyway, replacing the:<div class="codebox"><p>Code: </p><pre><code>set pubtime [clock format [clock scan $pubiso]]</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>set pubtime [clock format [clock scan [string map [list "T" " " "Z" ""] $pubiso]]]</code></pre></div>should do the trick.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun May 17, 2020 10:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-05-17T08:21:50-04:00</updated>

		<published>2020-05-17T08:21:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108413#p108413</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108413#p108413"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108413#p108413"><![CDATA[
i havent checked the script but on guess of what i know there must be a area to set the timezone and most lightly like this <br><div class="codebox"><p>Code: </p><pre><code>set timezone "timezone" </code></pre></div><br>and check if both " " are there and not just one <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>i'll look at the script in a bit <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Sun May 17, 2020 8:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2020-05-17T05:23:44-04:00</updated>

		<published>2020-05-17T05:23:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108412#p108412</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108412#p108412"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108412#p108412"><![CDATA[
Yes, I also got an error message. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br> [11:20] Tcl error [m00nie::youtube::autoinfo]: unable to convert date-time string "2020-05-16T11:51:42Z": more than one time zone in string<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Sun May 17, 2020 5:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-05-17T09:35:44-04:00</updated>

		<published>2020-05-16T12:12:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108411#p108411</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108411#p108411"/>
		<title type="html"><![CDATA[adding throttle in m00nie's youtube tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108411#p108411"><![CDATA[
there seems to be something broken in the script recently <br><br>been gettin this error in PL:<br><blockquote class="uncited"><div>&lt;TCL-IRC&gt; Tcl error [m00nie::youtube::autoinfo]: unable to convert date-time string "2019-08-17T17:43:19Z": more than one time zone in string<br></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sat May 16, 2020 12:12 pm</p><hr />
]]></content>
	</entry>
	</feed>
