Page MenuHomeDevCentral

No OneTemporary

diff --git a/Daeghrefn/Channel.tcl b/Daeghrefn/Channel.tcl
index 7f8db5a..20df831 100644
--- a/Daeghrefn/Channel.tcl
+++ b/Daeghrefn/Channel.tcl
@@ -1,43 +1,41 @@
# #wolfplex
bind pubm - "#wolfplex *" pubm:url
#
# URL management
#
#Determines if the URL matches a video site url:getvideotitle can handle
proc url:isvideo {url} {
- #We use grep "_VALID_URL =" /usr/local/bin/youtube-dl for this list
- foreach site "youtu.be metacafe.com dailymotion video.google.com photobucket.com video.yahoo.com youtube.com depositfiles.com" {
+ foreach site "youtu.be metacafe.com dailymotion video.google.com photobucket.com video.yahoo.com youtube.com depositfiles.com vimeo.com" {
if {[string first $site $url] > -1} {
return 1
}
}
return 0
}
#Gets video title
proc url:getvideotitle {url} {
set title ""
catch {
set title [exec -- youtube-dl -e $url]
}
return $title
}
#This proc allows to handle URLs in lines
#Currently, it prints the video title when not provided with the URL
#TODO: checks 402/403/404/500 error codes
proc pubm:url {nick uhost handle channel text} {
foreach url [geturls $text] {
if [url:isvideo $url] {
#Prints video information on the channel
#if it's not already in $text
set info [url:getvideotitle $url]
if {[string first $info $text] == -1} {
putserv "PRIVMSG $channel :$info"
}
}
}
}
-

File Metadata

Mime Type
text/x-diff
Expires
Thu, Sep 18, 12:37 (13 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2990815
Default Alt Text
(1 KB)

Event Timeline