debig
This commit is contained in:
parent
4bab4102f1
commit
400bf4aa4b
@ -20,6 +20,7 @@ module.exports = (lib, userlevel) => {
|
||||
var tmp = e.message.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi); // get links
|
||||
tmp.forEach((entry,i,a) => {
|
||||
if(!entry.match(/f0ck\.me/i) && !entry.match(/\.onion/i)) {
|
||||
e.reply("level: "+userlevel); // tmp
|
||||
getLink(entry, ((e.message.match(/(!|-)force/i) && userlevel >= 100)?true:false), (cb) => {
|
||||
if(cb.success === true) {
|
||||
fs.move(cb.file, cb.file + '.' + cb.info.ext, (err) => {
|
||||
@ -65,6 +66,7 @@ module.exports = (lib, userlevel) => {
|
||||
});
|
||||
|
||||
var getLink = (url, force, cb) => {
|
||||
lib.log("force: "+(force?"true":"false"));
|
||||
var yt = /https?:\/\/(www\.)?youtu(\.be\/|be\.com\/)((.+\/)?(watch(\?v=|.+&v=))?(v=)?)([\w_-]{11})(&.+)?/gi;
|
||||
var sc = /https?:\/\/(www\.)?(soundcloud\.com|snd\.sc)(\/\S*)(\/\S*)/gi;
|
||||
lib.checkRepost(url, (cbcr) => {
|
||||
|
Loading…
Reference in New Issue
Block a user