summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <lookshe@fumuga.com>2012-03-07 01:00:36 +0100
committerlookshe <lookshe@fumuga.com>2012-03-07 01:00:36 +0100
commit680716b32b3406233d8973d44ee8df0cb52b73ef (patch)
tree58f5b54901a303feffc4a7a8241f59a1b2d35001
parent55ed20e4813ff6d3ddbcd584e93388ec5a83fefa (diff)
add youtube title
-rw-r--r--tinyurl.tcl6
1 files changed, 6 insertions, 0 deletions
diff --git a/tinyurl.tcl b/tinyurl.tcl
index 83cc27a..e0fcba3 100644
--- a/tinyurl.tcl
+++ b/tinyurl.tcl
@@ -66,6 +66,12 @@ foreach act_arg $arg {
putserv "PRIVMSG $chan :\002Tiny URL\002: $tinyurl \[$title\] (URL by \002$nick\002)"
}
}
+
+ if {([string match "*youtube*watch*" $url] == 1)} {
+ set title [exec perl -e "use URI::Title;print URI::Title::title(\"$url\");"]
+ set title [string range $title 0 end-10]
+ putserv "PRIVMSG $chan :\002Youtube\002: $title (Video by \002$nick\002)"
+ }
}
}
return 0