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

	<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-01-11T14:44:10-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SoUkSoU]]></name></author>
		<updated>2014-01-11T14:44:10-04:00</updated>

		<published>2014-01-11T14:44:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102467#p102467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102467#p102467"/>
		<title type="html"><![CDATA[YouTube tcl Edits]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102467#p102467"><![CDATA[
Hello. Im using Youtube tcl version 1.3 from creative<br><div class="codebox"><p>Code: </p><pre><code># YouTube (Eggdrop/Tcl), Version 1.3## (c) creative (QuakeNet - #computerbase), 15. Feb. 2012## This program is free software: you can redistribute it and / or modify it under the# terms of the GNU General Public License, see http://www.gnu.org/licenses/gpl.html.## Example:# &lt;bo2000&gt; like her new video https://www.youtu.be/kfVsfOSbJY0# &lt;eggbert&gt; [Y] Rebecca Black - Friday - Official Music Video, 17.09.2011 (O 1.8)## Notice:# !youtube (on|off) enables or disables script for active channel (flags "mno" only)setudef flag youtubebind pubm - *youtu.be/* YouTubebind pubm - *youtube.com/watch*v=* YouTubebind pub mno|mno !youtube YouTube-Settingsproc YouTube {nick host hand chan text} {if {[channel get $chan youtube]} {set y_api "http://gdata.youtube.com/feeds/api/videos/"set y_odf "%d.%m.%Y"if {[catch {package require http 2.5}]} {putlog "YouTube: package http 2.5 or above required"} else {if {[regexp -nocase {(^|[ ]{1})(https{0,1}:\/\/(www\.){0,1}|www\.)(youtu\.be\/|youtube\.com\/watch[^ ]{1,}v=)([A-Za-z0-9_-]{11})} $text - - - - - y_vid]} {if {[catch {set y_con [::http::geturl $y_api$y_vid -headers [list {GData-Version} {2}] -timeout 5000]}]} {putlog "YouTube: connection error (e. g. host not found / reachable)"} elseif {[::http::status $y_con] == "ok"} {set y_data [::http::data $y_con]catch {::http::cleanup $y_con}} else {putlog "YouTube: connection error (e. g. time out / no data received)"catch {::http::cleanup $y_con}}}}}if {[info exists y_data]} {if {[regexp -nocase {&lt;title&gt;(.{1,})&lt;\/title&gt;} $y_data - y_data_t]} {set y_data_t [string map -nocase [list {"} {"} {&amp;} {&amp;} {&lt;} {&lt;} {&gt;} {&gt;}] $y_data_t]regsub -all -nocase {[ ]{1,}} $y_data_t { } y_data_t} else {putlog "YouTube: parsing error (&lt;title&gt;, $y_api$y_vid)"}if {[regexp -nocase {&lt;published&gt;([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.000Z)&lt;\/published&gt;} $y_data - y_data_p]} {set y_data_p [clock scan $y_data_p -format %Y-%m-%dT%H:%M:%S.000Z]set y_data_p [clock format $y_data_p -format $y_odf]} else {putlog "YouTube: parsing error (&lt;published&gt;, $y_api$y_vid)"}if {[regexp -nocase {&lt;gd:rating average='([0-9]{1}\.[0-9]{1,})'} $y_data - y_data_r]} {set y_data_r [format %.1f $y_data_r]set y_data_r "([encoding convertto utf-8 \u00D8] $y_data_r)"} else {set y_data_r "([encoding convertto utf-8 \u00D8] NR)"}if {[info exists y_data_t] &amp;&amp; [info exists y_data_p] &amp;&amp; [info exists y_data_r]} {putserv "privmsg $chan :\[Y\] $y_data_t, $y_data_p $y_data_r"}}}proc YouTube-Settings {nick host hand chan text} {if {![channel get $chan youtube] &amp;&amp; $text == "on"} {catch {channel set $chan +youtube}putserv "notice $nick :YouTube: enabled for $chan"putlog "YouTube: script enabled (by $nick for $chan)"} elseif {[channel get $chan youtube] &amp;&amp; $text == "off"} {catch {channel set $chan -youtube}putserv "notice $nick :YouTube: disabled for $chan"putlog "YouTube: script disabled (by $nick for $chan)"} else {putserv "notice $nick :YouTube: !youtube (on|off) enables or disables script for active channel"}}putlog "YouTube 1.3 loaded"</code></pre></div>I want if someone it's possible to add some more info when a link is grabbing for example:<br><div class="codebox"><p>Code: </p><pre><code>[20:37:37] &lt;Jack&gt; http://www.youtube.com/watch?v=3O1_3zBUKM8[20:37:37] &lt;@m0nika&gt; [Y] Naughty Boy - La La La ft. Sam Smith, 18.04.2013 (Ø 4.8)</code></pre></div>to be like this<br><div class="codebox"><p>Code: </p><pre><code>[20:37:37] &lt;Jack&gt; http://www.youtube.com/watch?v=3O1_3zBUKM8[20:37:37] &lt;@m0nika&gt; [[b]Youtube[/b]] Naughty Boy - La La La ft. Sam Smith [b]|[/b] Added: $date [b]|[/b] Uploader: $upload [b]|[/b] Views: $vies [b]|[/b] Likes: $likes - Dislikes: $dislikes</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12328">SoUkSoU</a> — Sat Jan 11, 2014 2:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
