sorted initfuncs
This commit is contained in:
parent
7d92d23718
commit
0621234e50
@ -15,6 +15,10 @@ function Lib(tbot, tsql) {
|
||||
this.sql = sql = tsql;
|
||||
this.debug = debug = false;
|
||||
this.admins = [];
|
||||
|
||||
Lib.prototype.loadUser((cb) => {
|
||||
console.log((cb)?"Admins wurden geladen":"Admins konnten nicht geladen werden");
|
||||
});
|
||||
}
|
||||
|
||||
Lib.prototype.getUser = (e, cbgu) => {
|
||||
|
@ -53,11 +53,6 @@ bot.on('message', (e) => {
|
||||
});
|
||||
});
|
||||
|
||||
lib.loadUser((cb)=>{
|
||||
console.log((cb)?"Admins wurden geladen":"Admins konnten nicht geladen werden");
|
||||
});
|
||||
websrv.getTpls();
|
||||
|
||||
var trigger = {
|
||||
trigger: [],
|
||||
add: (args) => {
|
||||
@ -74,7 +69,7 @@ var trigger = {
|
||||
|
||||
var loadPlugins = () => {
|
||||
var files = fs.readdirSync(__dirname+'/trigger/');
|
||||
files.forEach(function (file) {
|
||||
files.forEach((file) => {
|
||||
if(file.substr(-3, 3) === '.js') {
|
||||
console.log('Loading plugin', file);
|
||||
require(__dirname+'/trigger/' + file)(bot, trigger, lib);
|
||||
|
@ -13,6 +13,8 @@ function Websrv(tbot, tsql, tlib) {
|
||||
this.sql = sql = tsql;
|
||||
this.lib = lib = tlib;
|
||||
|
||||
Websrv.prototype.getTpls();
|
||||
|
||||
http.createServer((req, res) => {
|
||||
if(cfg.wlip.hasOwnProperty(req.connection.remoteAddress)) {
|
||||
var filePath = '.' + req.url;
|
||||
|
Loading…
Reference in New Issue
Block a user