Update websrv.js
This commit is contained in:
		@@ -35,20 +35,21 @@ function Websrv(tlib) {
 | 
				
			|||||||
            var autor = body.user_name;
 | 
					            var autor = body.user_name;
 | 
				
			||||||
            var branch = body.ref.split('/')[2];
 | 
					            var branch = body.ref.split('/')[2];
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            var commit = "";
 | 
					            if(branch === "master") {
 | 
				
			||||||
            try {
 | 
					              var commit = "";
 | 
				
			||||||
              commit = body.commits[body.commits.length-1].message.replace('\n','').trim();
 | 
					              try {
 | 
				
			||||||
            }
 | 
					                commit = body.commits[body.commits.length-1].message.replace('\n','').trim();
 | 
				
			||||||
            catch(ex) {
 | 
					              }
 | 
				
			||||||
              commit = body.commits[body.commits.length-2].message.replace('\n','').trim();
 | 
					              catch(ex) {
 | 
				
			||||||
            }
 | 
					                commit = body.commits[body.commits.length-2].message.replace('\n','').trim();
 | 
				
			||||||
            lib.bot.send( lib.cfg.debugchannel, eventname + ' from ' + autor + ' ('+commit+') in branch '+branch, 'n0xy' );
 | 
					              }
 | 
				
			||||||
            
 | 
					              lib.bot.send( lib.cfg.debugchannel, eventname + ' from ' + autor + ' ('+commit+') in branch '+branch, 'n0xy' );
 | 
				
			||||||
            if( lib.cfg.debugchannel === '#f0ck' ) {
 | 
					              if( lib.cfg.debugchannel === '#f0ck' ) {
 | 
				
			||||||
              exec('cd ../ & git pull', (error, stdout) => {
 | 
					                exec('cd ../ & git pull', (error, stdout) => {
 | 
				
			||||||
                if(error === null)
 | 
					                  if(error === null)
 | 
				
			||||||
                  lib.bot.send( lib.cfg.debugchannel, stdout, 'n0xy' );
 | 
					                    lib.bot.send( lib.cfg.debugchannel, stdout, 'n0xy' );
 | 
				
			||||||
              });
 | 
					                });
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
          res.writeHead(200, { 'Content-Type': 'text/html' });
 | 
					          res.writeHead(200, { 'Content-Type': 'text/html' });
 | 
				
			||||||
@@ -71,7 +72,6 @@ function Websrv(tlib) {
 | 
				
			|||||||
          '.mp3': 'audio/mpeg',
 | 
					          '.mp3': 'audio/mpeg',
 | 
				
			||||||
          '.mp4': 'video/mp4',
 | 
					          '.mp4': 'video/mp4',
 | 
				
			||||||
          '.webm': 'video/webm',
 | 
					          '.webm': 'video/webm',
 | 
				
			||||||
          '.css': 'text/css',
 | 
					 | 
				
			||||||
          '.ogg': 'audio/ogg'
 | 
					          '.ogg': 'audio/ogg'
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        if(filePath == "./index.html") { // mainpage
 | 
					        if(filePath == "./index.html") { // mainpage
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user