3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 12:12:35 +01:00
This commit is contained in:
reality 2014-07-14 22:54:42 +00:00
commit 80ff91b609
2 changed files with 5 additions and 5 deletions

View File

@ -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,

View File

@ -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,