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
5e607e80
Commit
5e607e80
authored
Sep 10, 2020
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to async function
parent
b0ec8b12
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
DiceRoll.js
DiceRoll.js
+1
-1
DuelChronicle.js
DuelChronicle.js
+1
-1
DuelChronicle_Random.js
DuelChronicle_Random.js
+6
-6
No files found.
DiceRoll.js
View file @
5e607e80
ygopro
.
ctos_follow_before
(
'
CHAT
'
,
true
,
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
ygopro
.
ctos_follow_before
(
'
CHAT
'
,
false
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
room
=
ROOM_all
[
client
.
rid
];
var
msg
=
_
.
trim
(
info
.
msg
);
if
(
msg
.
substring
(
0
,
5
)
!=
"
/roll
"
)
{
...
...
DuelChronicle.js
View file @
5e607e80
ygopro
.
ctos_follow_after
(
"
UPDATE_DECK
"
,
true
,
(
buffer
,
info
,
client
,
server
,
datas
)
=>
{
ygopro
.
ctos_follow_after
(
"
UPDATE_DECK
"
,
true
,
async
(
buffer
,
info
,
client
,
server
,
datas
)
=>
{
var
room
=
ROOM_all
[
client
.
rid
];
if
(
!
room
)
{
//无房间则返回
return
null
;
...
...
DuelChronicle_Random.js
View file @
5e607e80
ygopro
.
ctos_follow_after
(
"
UPDATE_DECK
"
,
true
,
(
buffer
,
info
,
client
,
server
,
datas
)
=>
{
ygopro
.
ctos_follow_after
(
"
UPDATE_DECK
"
,
true
,
async
(
buffer
,
info
,
client
,
server
,
datas
)
=>
{
var
room
=
ROOM_all
[
client
.
rid
];
if
(
!
room
)
{
return
null
;
...
...
@@ -96,7 +96,7 @@ ygopro.ctos_follow_after("UPDATE_DECK", true, (buffer, info, client, server, dat
return
true
;
});
ygopro
.
ctos_follow_before
(
'
CHAT
'
,
true
,
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
ygopro
.
ctos_follow_before
(
'
CHAT
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
room
=
ROOM_all
[
client
.
rid
];
if
(
!
room
)
{
return
;
...
...
@@ -119,7 +119,7 @@ ygopro.ctos_follow_before('CHAT', true, function(buffer, info, client, server, d
return
;
}
//"CREATE TABLE DCReportServer(reporterIp varchar(255),reportDate DateTime)";
var
sql
=
"
SELECT * FROM `DCReportServer` WHERE reporterIp=? AND reportDate > date_sub(now(), interval
1
5 minute)
"
;
var
sql
=
"
SELECT * FROM `DCReportServer` WHERE reporterIp=? AND reportDate > date_sub(now(), interval 5 minute)
"
;
sqlParams
=
[
client
.
ip
];
mysqldb
.
query
(
sql
,
sqlParams
,
function
(
err
,
result
)
{
if
(
err
)
{
...
...
@@ -129,7 +129,7 @@ ygopro.ctos_follow_before('CHAT', true, function(buffer, info, client, server, d
return
;
}
if
(
result
.
length
>
0
)
{
ygopro
.
stoc_send_chat
(
client
,
"
服务器端的举报在
1
5分钟内只能进行一次,请稍后再试
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
ygopro
.
stoc_send_chat
(
client
,
"
服务器端的举报在5分钟内只能进行一次,请稍后再试
"
,
ygopro
.
constants
.
COLORS
.
YELLOW
);
return
;
}
sql
=
"
INSERT INTO `DCReportServer` VALUES(?,now())
"
;
...
...
@@ -171,7 +171,7 @@ ygopro.ctos_follow_before('CHAT', true, function(buffer, info, client, server, d
});
return
true
;
});
ygopro
.
stoc_follow_after
(
"
DUEL_START
"
,
tru
e
,
(
buffer
,
info
,
client
,
server
,
datas
)
=>
{
ygopro
.
stoc_follow_after
(
"
DUEL_START
"
,
fals
e
,
(
buffer
,
info
,
client
,
server
,
datas
)
=>
{
var
room
=
ROOM_all
[
client
.
rid
];
room
.
mm_deck
=
null
;
});
...
...
@@ -183,7 +183,7 @@ ygopro.stoc_follow_after("CHANGE_SIDE", true, (buffer, info, client, server, dat
}
if
(
client
.
is_local
)
{
return
null
;
return
false
;
}
var
room_parameters
=
room
.
name
.
split
(
'
#
'
,
2
)[
0
].
split
(
/
[
,,
]
/
);
//房间名的参数
...
...
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