default values

This commit is contained in:
Flummi 2016-11-19 07:46:08 +01:00
parent b2e8119155
commit 4acff5016a
9 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@ module.exports = (lib) => {
name: 'clean', name: 'clean',
call: /^\!clean/i, call: /^\!clean/i,
level: 100, level: 100,
active: 1, active: 0,
func: (e) => { func: (e) => {
var dir_b = fs.readdirSync('./b/'); // Items var dir_b = fs.readdirSync('./b/'); // Items
var dir_t = fs.readdirSync('./t/'); // Thumbnails var dir_t = fs.readdirSync('./t/'); // Thumbnails

View File

@ -3,7 +3,7 @@ module.exports = (lib) => {
name: 'debug', name: 'debug',
call: /^\!debug$/i, call: /^\!debug$/i,
level: 100, level: 100,
active: 1, active: 0,
func: (e) => { func: (e) => {
if(lib.debug) { if(lib.debug) {
lib.debug = false; lib.debug = false;

View File

@ -5,7 +5,7 @@ module.exports = (lib) => {
name: 'delete', name: 'delete',
call: /^\!(del|rm) (\d+)$/i, call: /^\!(del|rm) (\d+)$/i,
level: 100, level: 100,
active: 1, active: 0,
func: (e) => { func: (e) => {
var id = e.message.split(' ')[1]; var id = e.message.split(' ')[1];
lib.sql.query("select `dest` from `f0ck`.`items` where `id` = ?", id, (err, rows, fields) => { lib.sql.query("select `dest` from `f0ck`.`items` where `id` = ?", id, (err, rows, fields) => {

View File

@ -5,7 +5,7 @@ module.exports = (lib) => {
name: 'gitpull', name: 'gitpull',
call: /^\!pull$/, call: /^\!pull$/,
level: 100, level: 100,
active: 1, active: 0,
func: (e) => { func: (e) => {
exec('cd ../../ & git pull', (error, stdout) => { exec('cd ../../ & git pull', (error, stdout) => {
if(error === null) { if(error === null) {

View File

@ -13,9 +13,9 @@ module.exports = (lib) => {
name: 'parser', name: 'parser',
call: /https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi, call: /https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi,
level: 0, level: 0,
active: 1, active: 0,
func: (e) => { func: (e) => {
if(e.channel.getName() == '#f0ck' || e.channel.getName() == '#kbot-dev') { //if(e.channel.getName() == '#f0ck' || e.channel.getName() == '#kbot-dev') {
if(!e.message.match(/\!ignore/)) { if(!e.message.match(/\!ignore/)) {
var tmp = e.message.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi); // get links var tmp = e.message.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi); // get links
tmp.forEach((entry,i,a) => { tmp.forEach((entry,i,a) => {
@ -58,7 +58,7 @@ module.exports = (lib) => {
}); });
} }
}); });
} //}
} }
}, },
desc: 'muh' desc: 'muh'

View File

@ -5,7 +5,7 @@ module.exports = (lib) => {
name: 'stats', name: 'stats',
call: /^\!stats$/i, call: /^\!stats$/i,
level: 10, level: 10,
active: 1, active: 0,
func: (e) => { func: (e) => {
lib.sql.query("select count(`id`) as anzahl from `f0ck`.`items`", (err, rows, fields) => { lib.sql.query("select count(`id`) as anzahl from `f0ck`.`items`", (err, rows, fields) => {
var ret = "f0ck gave "+String(rows[0].anzahl); var ret = "f0ck gave "+String(rows[0].anzahl);

View File

@ -3,7 +3,7 @@ module.exports = (lib) => {
name: 'sync', name: 'sync',
call: /^!sync$/i, call: /^!sync$/i,
level: 100, level: 100,
active: 1, active: 0,
func: (e) => { func: (e) => {
lib.bot.names(e.channel, e.network, names => { lib.bot.names(e.channel, e.network, names => {
Object.keys(names).forEach(key => { Object.keys(names).forEach(key => {

View File

@ -5,7 +5,7 @@ module.exports = (lib) => {
name: 'thumbnailer', name: 'thumbnailer',
call: /^\!thumb(.*\d+)?$/i, call: /^\!thumb(.*\d+)?$/i,
level: 100, level: 100,
active: 1, active: 0,
func: (e) => { func: (e) => {
var id; var id;
if(id = e.message.split(' ')[1]) { if(id = e.message.split(' ')[1]) {

View File

@ -7,7 +7,7 @@ module.exports = (lib) => {
name: 'umode', name: 'umode',
call: /^\!umode .*/i, call: /^\!umode .*/i,
level: 100, level: 100,
active: 1, active: 0,
func: (e) => { func: (e) => {
var tmp = e.message.trim().split(' '); var tmp = e.message.trim().split(' ');
tmp.shift(); tmp.shift();