Continue AI features and improve protocol support
This commit is contained in:
@@ -17,8 +17,8 @@ def log(data):
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") # Adjust if needed
|
||||
django.setup()
|
||||
|
||||
from django.contrib.auth import authenticate
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.auth import authenticate # noqa: E402
|
||||
from django.contrib.auth.models import User # noqa: E402
|
||||
|
||||
|
||||
def check_credentials(username, password):
|
||||
@@ -52,11 +52,11 @@ def main():
|
||||
|
||||
if command == "auth":
|
||||
if password and check_credentials(username, password):
|
||||
log(f"Authentication success")
|
||||
log("Authentication success")
|
||||
log("Sent 1")
|
||||
print("1", flush=True) # Success
|
||||
else:
|
||||
log(f"Authentication failure")
|
||||
log("Authentication failure")
|
||||
log("Sent 0")
|
||||
print("0", flush=True) # Failure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user