Add files via upload

This commit is contained in:
Harold Finch
2023-04-10 07:18:32 +02:00
committed by GitHub
parent 06ddbf431f
commit 65875d8fef
100 changed files with 84692 additions and 42 deletions

0
libs/f2b/__init__.py Normal file
View File

17
libs/f2b/log.py Normal file
View File

@@ -0,0 +1,17 @@
import web
from controllers import decorators
from libs.logger import logger
@decorators.require_global_admin
def num_banned() -> int:
total = 0
try:
_qr = web.conn_f2b.select("banned", what="COUNT(id) AS total")
total = _qr[0]['total']
except Exception as e:
logger.error(e)
return total