verbose output if debug is activated

This commit is contained in:
Flummi 2016-10-23 00:10:45 +02:00
parent 822b72d560
commit 42b84c134c
2 changed files with 10 additions and 4 deletions

View File

@ -9,8 +9,10 @@ module.exports = (lib) => {
func: (e) => {
exec('cd ../../ & git pull', (error, stdout) => {
if(error === null) {
e.reply( 'git pull suxxessfully.' );
//e.reply(stdout);
if(!lib.debug)
e.reply('git pull suxxessfully.');
else
lib.log(stdout);
}
});
},

View File

@ -46,8 +46,12 @@ function Websrv(tlib) {
lib.bot.send( lib.cfg.debugchannel, eventname + ' from ' + autor + ' ('+commit+') in branch '+branch, 'n0xy' );
if( lib.cfg.debugchannel === '#f0ck' ) {
exec('cd ../ & git pull', (error, stdout) => {
if(error === null)
lib.bot.send( lib.cfg.debugchannel, 'git pull suxxessfully.', 'n0xy' );
if(error === null) {
if(!lib.debug)
lib.bot.send(lib.cfg.debugchannel, 'git pull suxxessfully.', 'n0xy');
else
lib.log(stdout);
}
});
}
}