Döner
This commit is contained in:
parent
5177dbee5a
commit
31a633bda6
|
@ -1,6 +1,6 @@
|
|||
import { irc as irclib } from "./src/clients/irc";
|
||||
import { tg as tglib } from "./src/clients/tg";
|
||||
import * as admins from "./src/inc/admin";
|
||||
import { admins } from "./src/inc/admin";
|
||||
|
||||
import EventEmitter from "events";
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
"description": "lul",
|
||||
"main": "index.mjs",
|
||||
"scripts": {
|
||||
"start": "node --experimental-modules test.mjs"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
let _admins = [];
|
||||
export let admins = { admins: [] };
|
||||
|
||||
const getLevel = (network, user) => {
|
||||
export const getLevel = (network, user) => {
|
||||
let ret = {
|
||||
level: 0,
|
||||
verified: false
|
||||
|
@ -9,7 +9,7 @@ const getLevel = (network, user) => {
|
|||
return "user has to be an object!";
|
||||
if (!user.account || !user.prefix)
|
||||
return ret;
|
||||
for(let admin of _admins) {
|
||||
for(let admin of admins.admins) {
|
||||
if (admin.account === user.account.toLowerCase() && admin.network === network.toLowerCase()) {
|
||||
ret = {
|
||||
level: admin.level,
|
||||
|
@ -19,7 +19,3 @@ const getLevel = (network, user) => {
|
|||
};
|
||||
return ret;
|
||||
};
|
||||
|
||||
export {
|
||||
_admins, getLevel
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user