Merge branch 'f0ckdev' into 'master'

F0ckdev



See merge request !9
This commit is contained in:
Flummi 2016-10-20 23:58:25 +00:00
commit 411a65d228
4 changed files with 37 additions and 31 deletions

View File

@ -1,3 +1,5 @@
blah
how to install: how to install:
1. install ffmpeg 1. install ffmpeg

View File

@ -1,6 +1,6 @@
{ {
"name": "keinBotv2", "name": "keinBotv2",
"version": "0.1.1", "version": "0.2.0",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {
"start": "node ./bot.js" "start": "node ./bot.js"

View File

@ -12,6 +12,7 @@ module.exports = (lib) => {
var name = args[1].replace('@',''); var name = args[1].replace('@','');
var level = (args[2]>=100)?100:args[2]; var level = (args[2]>=100)?100:args[2];
if(name.toLowerCase() != lib.bot.me.nick.toLowerCase()) {
if( name in e.channel.names ) { if( name in e.channel.names ) {
lib.bot.whois(name.trim(), e.network, (err, data) => { lib.bot.whois(name.trim(), e.network, (err, data) => {
if(!err) { if(!err) {
@ -49,6 +50,9 @@ module.exports = (lib) => {
else else
e.reply('user '+name+' not found'); e.reply('user '+name+' not found');
} }
else
e.reply('f0ck you hard');
}
else else
e.reply('no permission, min level 100 required'); e.reply('no permission, min level 100 required');
} }

View File

@ -40,7 +40,7 @@ module.exports = (lib) => {
(cb.info.thumb !== null)?cb.info.thumb:'' (cb.info.thumb !== null)?cb.info.thumb:''
]).on('result', (result) => { ]).on('result', (result) => {
lib.generateThumbs(); lib.generateThumbs();
e.reply("https://f0ck.me/"+result.insertId+" - "+cb.info.title+" ("+cb.info.mime+", ~"+lib.formatSize(cb.size)+") from "+cbgu['nick']+" ("+cbgu['username']+"@"+cbgu['hostname']+")"); e.reply(cfg.url+"/"+result.insertId+" - "+cb.info.title+" ("+cb.info.mime+", ~"+lib.formatSize(cb.size)+") from "+cbgu['nick']+" ("+cbgu['username']+"@"+cbgu['hostname']+")");
}).on('error', (msg) => { }).on('error', (msg) => {
e.reply(msg); e.reply(msg);
}); });
@ -191,7 +191,7 @@ module.exports = (lib) => {
cb({ success: false, msg: 'lol, go f0ck yourself ('+mime+')' }); cb({ success: false, msg: 'lol, go f0ck yourself ('+mime+')' });
} }
else else
cb({ success: false, msg: 'repost motherf0cker: https://f0ck.me/'+cbcrcs }); cb({ success: false, msg: 'repost motherf0cker: '+cfg.url+'/'+cbcrcs });
}); });
}); });
} }
@ -202,7 +202,7 @@ module.exports = (lib) => {
}); });
} }
else else
cb({ success: false, msg: 'repost motherf0cker: https://f0ck.me/'+cbcr }); cb({ success: false, msg: 'repost motherf0cker: '+cfg.url+'/'+cbcr });
}); });
}; };
}; };