Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
fbce123d
Commit
fbce123d
authored
Nov 16, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect mysql for match score
parent
c2e7bd78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
ygopro-server.coffee
ygopro-server.coffee
+6
-1
ygopro-server.js
ygopro-server.js
+6
-1
No files found.
ygopro-server.coffee
View file @
fbce123d
...
...
@@ -323,6 +323,11 @@ init = () ->
settings
.
modules
.
chat_color
.
enabled
=
false
await
setting_save
(
settings
)
log
.
warn
(
"Chat color cannot be enabled because no MySQL."
)
if
settings
.
modules
.
random_duel
.
record_match_scores
settings
.
modules
.
random_duel
.
record_match_scores
=
false
await
setting_save
(
settings
)
log
.
warn
(
"Cannot record random match scores because no MySQL."
)
# 读取数据
default_data
=
await
loadJSONAsync
(
'./data/default_data.json'
)
try
...
...
@@ -485,7 +490,7 @@ init = () ->
if
settings
.
modules
.
dialogues
.
get
load_dialogues
()
if
settings
.
modules
.
random_duel
.
post_match_scores
if
settings
.
modules
.
random_duel
.
post_match_scores
and
settings
.
modules
.
mysql
.
enabled
setInterval
(()
->
scores
=
await
dataManager
.
getRandomScoreTop10
()
...
...
ygopro-server.js
View file @
fbce123d
...
...
@@ -423,6 +423,11 @@
await
setting_save
(
settings
);
log
.
warn
(
"
Chat color cannot be enabled because no MySQL.
"
);
}
if
(
settings
.
modules
.
random_duel
.
record_match_scores
)
{
settings
.
modules
.
random_duel
.
record_match_scores
=
false
;
await
setting_save
(
settings
);
log
.
warn
(
"
Cannot record random match scores because no MySQL.
"
);
}
}
// 读取数据
default_data
=
(
await
loadJSONAsync
(
'
./data/default_data.json
'
));
...
...
@@ -622,7 +627,7 @@
if
(
settings
.
modules
.
dialogues
.
get
)
{
load_dialogues
();
}
if
(
settings
.
modules
.
random_duel
.
post_match_scores
)
{
if
(
settings
.
modules
.
random_duel
.
post_match_scores
&&
settings
.
modules
.
mysql
.
enabled
)
{
setInterval
(
async
function
()
{
var
scores
;
scores
=
(
await
dataManager
.
getRandomScoreTop10
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment