diff --git a/modules/reddit/reddit.js b/modules/reddit/reddit.js index e2f7196..33ad8f7 100644 --- a/modules/reddit/reddit.js +++ b/modules/reddit/reddit.js @@ -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, diff --git a/modules/youtube/youtube.js b/modules/youtube/youtube.js index 2758257..4a53027 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -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,