From e5a9142384644b93030f17532d6515711db9d7b1 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sun, 3 Jun 2012 21:17:25 +0100 Subject: [PATCH 1/3] read title even when over multiple lines --- modules/link.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/link.js b/modules/link.js index 82df1c4..dacb36a 100644 --- a/modules/link.js +++ b/modules/link.js @@ -20,6 +20,7 @@ var link = function(dbot) { request(link, function (error, response, body) { if(!error && response.statusCode == 200) { + body = body.replace(/(\r\n|\n\r|\n)/gm, " "); var title = body.valMatch(/(.*)<\/title>/, 2); if(title) { event.reply(title[1]); From 3f38356717b401df6680aa867d95c5036819cd4a Mon Sep 17 00:00:00 2001 From: Luke Slater <tinmachin3@gmail.com> Date: Mon, 4 Jun 2012 01:19:35 +0100 Subject: [PATCH 2/3] no rmlast limit --- modules/quotes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/quotes.js b/modules/quotes.js index 64829ed..eb02105 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -93,7 +93,7 @@ var quotes = function(dbot) { }, '~rmlast': function(event) { - if(rmAllowed == true || dbot.admin.include(event.user)) { + //if(rmAllowed == true || dbot.admin.include(event.user)) { var key = event.input[1].trim().toLowerCase(); if(quotes.hasOwnProperty(key)) { if(!dbot.db.locks.include(key) || dbot.admin.include(event.user)) { @@ -109,9 +109,9 @@ var quotes = function(dbot) { } else { event.reply(dbot.t('no_quotes', {'category': q[1]})); } - } else { + /*} else { event.reply(dbot.t('rmlast_spam')); - } + }*/ }, /*'~rm': function(data, params) { From 034525e601541aa7768575be125602f0f84b83a6 Mon Sep 17 00:00:00 2001 From: Luke Slater <tinmachin3@gmail.com> Date: Mon, 4 Jun 2012 03:03:51 +0100 Subject: [PATCH 3/3] readd rmlast limit --- modules/quotes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/quotes.js b/modules/quotes.js index eb02105..64829ed 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -93,7 +93,7 @@ var quotes = function(dbot) { }, '~rmlast': function(event) { - //if(rmAllowed == true || dbot.admin.include(event.user)) { + if(rmAllowed == true || dbot.admin.include(event.user)) { var key = event.input[1].trim().toLowerCase(); if(quotes.hasOwnProperty(key)) { if(!dbot.db.locks.include(key) || dbot.admin.include(event.user)) { @@ -109,9 +109,9 @@ var quotes = function(dbot) { } else { event.reply(dbot.t('no_quotes', {'category': q[1]})); } - /*} else { + } else { event.reply(dbot.t('rmlast_spam')); - }*/ + } }, /*'~rm': function(data, params) {