mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
autoshorten threshold 80
This commit is contained in:
parent
1b0a32078c
commit
39d3021870
@ -11,7 +11,7 @@ var autoshorten = function(dbot) {
|
||||
var urlRegex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
||||
var urlMatches = data.message.match(urlRegex);
|
||||
|
||||
if(urlMatches !== null && urlMatches[0].length > 65) {
|
||||
if(urlMatches !== null && urlMatches[0].length > 80) {
|
||||
var url = urlMatches[0]; // Only doing one, screw you.
|
||||
|
||||
// TODO: Make this use a decent URL shortener. Mine is shit.
|
||||
|
Loading…
Reference in New Issue
Block a user