-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from Mooling0602/dev
dev -> main
- Loading branch information
Showing
20 changed files
with
300 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Ci configuration for GitHub Actions. | ||
[framework] | ||
ver=4 | ||
ver=3 | ||
[main] | ||
ver=2.5.0 | ||
ver=2.5.1 | ||
[release] | ||
test=0 | ||
[ci] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
import os | ||
import matrix_sync.utils.tr as tr | ||
import matrix_sync.plg_globals as plg_globals | ||
|
||
from .default import * | ||
from ..utils import * | ||
from ..client.init import check_token | ||
from mcdreforged.api.types import PluginServerInterface | ||
|
||
|
||
async def load_config(server: PluginServerInterface): | ||
plg_globals.config = server.load_config_simple('config.json', account_config) | ||
if plg_globals.config == account_config: | ||
server.unload_plugin(plgSelf.id) | ||
plg_globals.settings = server.load_config_simple('settings.json', default_settings) | ||
if plg_globals.settings["ver"] != "2.5.1": | ||
plg_globals.settings = None | ||
psi.logger.info(tr("settings_comp_check.failed")) | ||
os.rename(f"{configDir}/settings.json", f"{configDir}/settings.json.bak") | ||
plg_globals.settings = server.load_config_simple('settings.json', default_settings) | ||
if not plg_globals.settings["log_style"]["mcdr"]: | ||
psi.logger.info("Plugin MatrixSync will use its logger, with different format to MCDR.") | ||
psi.logger.info("Plugin MatrixSync will use its logger, different with MCDR.") | ||
if os.path.exists(f"{configDir}/token.json"): | ||
plg_globals.token_vaild = await check_token() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.