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