mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 12:12:35 +01:00
Merge branch 'master' of https://github.com/reality/dbot
This commit is contained in:
commit
80ff91b609
@ -59,7 +59,7 @@ var reddit = function(dbot) {
|
||||
if(!err && posts.length > 0) {
|
||||
_.each(posts, function(post) {
|
||||
dbot.say(channel.server, channel.channel, dbot.t('about_post', {
|
||||
'title': post.title.trim(),
|
||||
'title': _.unescape(post.title.trim()),
|
||||
'poster': post.author,
|
||||
'subreddit': post.subreddit,
|
||||
'comments': post.num_comments,
|
||||
@ -260,7 +260,7 @@ var reddit = function(dbot) {
|
||||
this.api.getPostInfo(matches[4], function(info) {
|
||||
if(info) {
|
||||
var infoString = dbot.t('about_post', {
|
||||
'title': info.title.trim(),
|
||||
'title': _.unescape(info.title.trim()),
|
||||
'poster': info.author,
|
||||
'subreddit': info.subreddit,
|
||||
'comments': info.num_comments,
|
||||
@ -297,7 +297,7 @@ var reddit = function(dbot) {
|
||||
this.api.getPostInfo(match[2], function(info) {
|
||||
if(info) {
|
||||
var infoString = dbot.t('about_post', {
|
||||
'title': info.title.trim(),
|
||||
'title': _.unescape(info.title.trim()),
|
||||
'poster': info.author,
|
||||
'subreddit': info.subreddit,
|
||||
'comments': info.num_comments,
|
||||
|
@ -64,7 +64,7 @@ var youtube = function(dbot) {
|
||||
};
|
||||
|
||||
this.commands = {
|
||||
'~youtube': function(event) {
|
||||
'~yt': function(event) {
|
||||
this.api.search(event.input[1], function(body) {
|
||||
if(_.isObject(body) && _.has(body, 'feed') && _.has(body.feed, 'entry')) {
|
||||
event.reply(this.internalAPI.formatLink(body.feed.entry[0]));
|
||||
@ -74,7 +74,7 @@ var youtube = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
this.commands['~youtube'].regex = [/^youtube (.+)$/, 2];
|
||||
this.commands['~yt'].regex = [/^yt (.+)$/, 2];
|
||||
|
||||
this.onLoad = function() {
|
||||
dbot.api.link.addHandler(this.name, this.LinkRegex,
|
||||
|
Loading…
Reference in New Issue
Block a user