drop backupbox's admin names
This commit is contained in:
parent
eab0787fff
commit
75278707bb
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
from os import environ as env
|
from os import environ as env
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
import re, codecs
|
import re, codecs
|
||||||
from typing import Union, Any
|
from typing import Optional, Any
|
||||||
import bare
|
import bare
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
@ -32,7 +32,7 @@ servers: dict[str, dict[str, Any]] = {
|
||||||
"backupbox": {
|
"backupbox": {
|
||||||
"address": "172.23.11.5",
|
"address": "172.23.11.5",
|
||||||
"channels": {"#default": 0},
|
"channels": {"#default": 0},
|
||||||
"admins": ["firepup650", "thelounge87"]
|
"admins": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
admin_hosts: list[str] = ["firepup.firepi", "owner.firepi", "47.221.227.180"]
|
admin_hosts: list[str] = ["firepup.firepi", "owner.firepi", "47.221.227.180"]
|
||||||
|
@ -63,5 +63,5 @@ def mfind(message: str, find: list, usePrefix: bool = True) -> bool:
|
||||||
else:
|
else:
|
||||||
return any(message[: len(match)] == match for match in find)
|
return any(message[: len(match)] == match for match in find)
|
||||||
|
|
||||||
def adminCheck(bot: bare.bot, name: str, host: str) -> bool:
|
def adminCheck(bot: bare.bot, name: str, host: Optional[str] = "nul") -> bool:
|
||||||
return name in servers[bot.server]["admins"] or host in admin_hosts
|
return name in servers[bot.server]["admins"] or host in admin_hosts
|
||||||
|
|
Loading…
Reference in a new issue