cla66ic/deps.ts
2024-04-28 15:32:04 +03:00

21 lines
922 B
TypeScript

import "https://deno.land/x/dotenv@v3.2.0/load.ts";
export * as cbor from "https://deno.land/x/cbor@v1.5.9/index.js"
export * as log from "https://deno.land/std@0.136.0/log/mod.ts";
export { crypto } from "https://deno.land/std@0.136.0/crypto/mod.ts";
export { EventEmitter } from "./events.ts";
import "https://deno.land/x/dotenv@v3.2.0/load.ts";
export const toHexString = (bytes: Uint8Array) =>
bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, "0"), "");
export const config = {
ops: Deno.env.get("OPS") ? JSON.parse(Deno.env.get("OPS")!) : [],
port: +Deno.env.get("PORT")!,
hash: Deno.env.get("HASH"),
onlineMode: Deno.env.get("ONLINEMODE") == "true",
main: Deno.env.get("MAIN") || "main",
maxUsers: +(Deno.env.get("USERS") || 24) > 255 ? 255 : +(Deno.env.get("USERS") || 24),
software: Deno.env.get("SOFTWARE") || "Custom Cla66ic",
name: Deno.env.get("NAME") || "Cla66ic Server"
};