Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
dc-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
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
JoyJ
dc-plugins
Commits
00547c50
Commit
00547c50
authored
Mar 25, 2022
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto report when deck error
parent
a2bacf5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
7 deletions
+45
-7
DuelChronicle_Random.js
DuelChronicle_Random.js
+45
-7
No files found.
DuelChronicle_Random.js
View file @
00547c50
...
...
@@ -58,11 +58,34 @@ ygopro.ctos_follow_after("UPDATE_DECK", true, async (buffer, info, client, serve
client
.
deckMd5
=
global
.
dc_decks_md5
[
deckindex
];
}
ygopro
.
ctos_send
(
server
,
"
UPDATE_DECK
"
,
{
mainc
:
client
.
main
.
length
,
sidec
:
client
.
side
.
length
,
deckbuf
:
compat_deckbuf
});
try
{
ygopro
.
ctos_send
(
server
,
"
UPDATE_DECK
"
,
{
mainc
:
client
.
main
.
length
,
sidec
:
client
.
side
.
length
,
deckbuf
:
compat_deckbuf
});
ygopro
.
stoc_send_chat
(
client
,
"
如果卡组有问题,请在决斗中于聊天框输入【/report 举报理由】进行举报。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
ygopro
.
stoc_send_chat
(
client
,
"
编年史QQ群号:838595368。可在群内下载编年史客户端,解锁更多功能。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
}
catch
{
var
err_msg
=
"
(由于卡组异常,被服务器端自动提交)
"
;
var
err_md5
=
global
.
dc_decks_md5
[
deckindex
];
var
err_sql
=
"
INSERT INTO DCReport VALUES(?,?,?,'')
"
;
var
err_ip
=
"
127.0.0.1
"
;
var
err_sqlParams
=
[
err_md5
,
err_ip
,
err_msg
];
log
.
info
(
"
READY_FAILURE :
"
+
err_md5
);
ygopro
.
stoc_send_chat
(
client
,
"
意外的错误,你可能抽到了无效卡组。请重新准备。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
ygopro
.
stoc_send_chat
(
client
,
"
服务器将尝试将卡组举报。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
mysqldb
.
query
(
err_sql
,
err_sqlParams
,
function
(
err
)
{
if
(
err
)
{
global
.
mysqldb
=
mysql
.
createConnection
(
global
.
settings
.
modules
.
cloud_replay
.
mysql
);
log
.
info
(
err
);
ygopro
.
stoc_send_chat
(
client
,
"
举报失败。卡组ID:
"
+
err_md5
+
"
,请向管理员反映此情况。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
return
;
}
ygopro
.
stoc_send_chat
(
client
,
"
举报ID:
"
+
err_md5
+
"
,可用编年史客户端查看并修改。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
});
}
if
(
MirrorMode
)
{
return
true
;
...
...
@@ -242,8 +265,23 @@ ygopro.stoc_follow_after("CHANGE_SIDE", true, (buffer, info, client, server, dat
});
}
catch
{
log
.
info
(
"
READY_FAILURE :
"
+
global
.
dc_decks_md5
[
deckindex
]);
ygopro
.
stoc_send_chat
(
client
,
"
意外的错误,你可能抽到了无效卡组。请重新准备
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
var
err_msg
=
"
(由于卡组异常,被服务器端自动提交)
"
;
var
err_md5
=
global
.
dc_decks_md5
[
deckindex
];
var
err_sql
=
"
INSERT INTO DCReport VALUES(?,?,?,'')
"
;
var
err_ip
=
"
127.0.0.1
"
;
var
err_sqlParams
=
[
err_md5
,
err_ip
,
err_msg
];
log
.
info
(
"
READY_FAILURE :
"
+
err_md5
);
ygopro
.
stoc_send_chat
(
client
,
"
意外的错误,你可能抽到了无效卡组。请重新准备。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
ygopro
.
stoc_send_chat
(
client
,
"
服务器将尝试将卡组举报。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
mysqldb
.
query
(
err_sql
,
err_sqlParams
,
function
(
err
)
{
if
(
err
)
{
global
.
mysqldb
=
mysql
.
createConnection
(
global
.
settings
.
modules
.
cloud_replay
.
mysql
);
log
.
info
(
err
);
ygopro
.
stoc_send_chat
(
client
,
"
举报失败。卡组ID:
"
+
err_md5
+
"
,请向管理员反映此情况。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
return
;
}
ygopro
.
stoc_send_chat
(
client
,
"
举报ID:
"
+
err_md5
+
"
,可用编年史客户端查看并修改。
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
});
}
if
(
MirrorMode
)
{
...
...
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