Skip to content

Commit

Permalink
Update to v2.5.0-4, fixed first login not work
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooling0602 committed Dec 22, 2024
1 parent 168c853 commit 560c2ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ci configuration for GitHub Actions.
[framework]
ver=3
ver=4
[main]
ver=2.5.0
[release]
Expand Down
3 changes: 2 additions & 1 deletion matrix_sync/client/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ async def login_by_password():
await cache_token(resp)
log_info(tr("login.save_token"))
else:
log_error(f"{tr("login.failed")}: {resp}")
tip = tr("login.failed")
log_error(f"{tip}: {resp}")
homeserver = get_homeserver(plg_globals.config["homeserver"])
log_info(f'homeserver: "{homeserver}", bot: "{plg_globals.config["user_id"]}"')
log_error(tr("check_config"))
Expand Down
7 changes: 6 additions & 1 deletion matrix_sync/entry.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import os

from .utils import tr
from .utils.logger import *
from .client.init import login_by_password
from .client.reporter import send_to_matrix
from .client.receiver import stop_sync
from .config import load_config
from .commands import *
from mcdreforged.api.all import *


# Framwork ver: 2.5.0-2
# Framwork ver: 2.5.0-4
async def on_load(server: PluginServerInterface, prev_module):
await load_config(server)
command_register(server)
if not os.path.exists(f"{configDir}/token.json"):
await login_by_password()
start_sync()

def on_server_start(server: PluginServerInterface):
Expand Down

0 comments on commit 560c2ca

Please sign in to comment.