muh
This commit is contained in:
parent
7da5f9c653
commit
67238858bd
|
@ -6,7 +6,7 @@ import EventEmitter from "events";
|
||||||
|
|
||||||
const clients = [];
|
const clients = [];
|
||||||
|
|
||||||
const cuffeo = class wrapper extends EventEmitter {
|
const cuffeo = class cuffeo extends EventEmitter {
|
||||||
constructor(cfg, _admins = []) {
|
constructor(cfg, _admins = []) {
|
||||||
super();
|
super();
|
||||||
admins.admins = _admins;
|
admins.admins = _admins;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
let _admins = [];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
admins: [],
|
admins: _admins,
|
||||||
getLevel: (network, user) => {
|
getLevel: (network, user) => {
|
||||||
let ret = {
|
let ret = {
|
||||||
level: 0,
|
level: 0,
|
||||||
|
@ -9,7 +11,7 @@ export default {
|
||||||
return "user has to be an object!";
|
return "user has to be an object!";
|
||||||
if (!user.account || !user.prefix)
|
if (!user.account || !user.prefix)
|
||||||
return ret;
|
return ret;
|
||||||
for(let admin of admins) {
|
for(let admin of _admins) {
|
||||||
if (admin.account === user.account.toLowerCase() && admin.network === network.toLowerCase()) {
|
if (admin.account === user.account.toLowerCase() && admin.network === network.toLowerCase()) {
|
||||||
ret = {
|
ret = {
|
||||||
level: admin.level,
|
level: admin.level,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user