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
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
nanahira
srvpro
Commits
36683943
Commit
36683943
authored
Mar 01, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
4d342065
Pipeline
#33401
failed with stages
in 5 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
ygopro-server.coffee
ygopro-server.coffee
+3
-3
ygopro-server.js
ygopro-server.js
+4
-3
No files found.
ygopro-server.coffee
View file @
36683943
...
@@ -1767,11 +1767,11 @@ class Room
...
@@ -1767,11 +1767,11 @@ class Room
add_windbot
:
(
botdata
)
->
add_windbot
:
(
botdata
)
->
@
windbot
=
botdata
@
windbot
=
botdata
url
=
"http://
#{
settings
.
modules
.
windbot
.
server_ip
}
:
#{
settings
.
modules
.
windbot
.
port
}
/?name=
#{
encodeURIComponent
(
botdata
.
name
)
}
&deck=
#{
encodeURIComponent
(
botdata
.
deck
)
}
&host=
#{
settings
.
modules
.
windbot
.
my_ip
}
&port=
#{
settings
.
port
}
&dialog=
#{
encodeURIComponent
(
botdata
.
dialog
)
}
&version=
#{
settings
.
version
}
&password=
#{
encodeURIComponent
(
@
name
)
}
"
bot_
url
=
"http://
#{
settings
.
modules
.
windbot
.
server_ip
}
:
#{
settings
.
modules
.
windbot
.
port
}
/?name=
#{
encodeURIComponent
(
botdata
.
name
)
}
&deck=
#{
encodeURIComponent
(
botdata
.
deck
)
}
&host=
#{
settings
.
modules
.
windbot
.
my_ip
}
&port=
#{
settings
.
port
}
&dialog=
#{
encodeURIComponent
(
botdata
.
dialog
)
}
&version=
#{
settings
.
version
}
&password=
#{
encodeURIComponent
(
@
name
)
}
"
if
botdata
.
deckcode
if
botdata
.
deckcode
url
+=
"&deckcode=
#{
encodeURIComponent
(
botdata
.
deckcode
.
toString
(
'base64'
))
}
"
bot_
url
+=
"&deckcode=
#{
encodeURIComponent
(
botdata
.
deckcode
.
toString
(
'base64'
))
}
"
request
request
url
:
url
url
:
bot_
url
,
(
error
,
response
,
body
)
=>
,
(
error
,
response
,
body
)
=>
if
error
if
error
log
.
warn
'windbot add error'
,
error
,
this
.
name
log
.
warn
'windbot add error'
,
error
,
this
.
name
...
...
ygopro-server.js
View file @
36683943
...
@@ -2331,13 +2331,14 @@
...
@@ -2331,13 +2331,14 @@
}
}
add_windbot(botdata) {
add_windbot(botdata) {
var bot_url;
this.windbot = botdata;
this.windbot = botdata;
url
=
`http://
${
settings
.
modules
.
windbot
.
server_ip
}
:
${
settings
.
modules
.
windbot
.
port
}
/?name=
${
encodeURIComponent
(
botdata
.
name
)}
&deck=
${
encodeURIComponent
(
botdata
.
deck
)}
&host=
${
settings
.
modules
.
windbot
.
my_ip
}
&port=
${
settings
.
port
}
&dialog=
${
encodeURIComponent
(
botdata
.
dialog
)}
&version=
${
settings
.
version
}
&password=
${
encodeURIComponent
(
this
.
name
)}
`
;
bot_
url = `http://${settings.modules.windbot.server_ip}:${settings.modules.windbot.port}/?name=${encodeURIComponent(botdata.name)}&deck=${encodeURIComponent(botdata.deck)}&host=${settings.modules.windbot.my_ip}&port=${settings.port}&dialog=${encodeURIComponent(botdata.dialog)}&version=${settings.version}&password=${encodeURIComponent(this.name)}`;
if (botdata.deckcode) {
if (botdata.deckcode) {
url
+=
`&deckcode=
${
encodeURIComponent
(
botdata
.
deckcode
.
toString
(
'
base64
'
))}
`
;
bot_
url += `&deckcode=${encodeURIComponent(botdata.deckcode.toString('base64'))}`;
}
}
request({
request({
url
:
url
url:
bot_
url
}, (error, response, body) => {
}, (error, response, body) => {
if (error) {
if (error) {
log.warn('windbot add error', error, this.name);
log.warn('windbot add error', error, this.name);
...
...
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