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
2cb22aa3
Commit
2cb22aa3
authored
Sep 17, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto respawn windbot
parent
4f8813e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
ygopro-server.coffee
ygopro-server.coffee
+12
-1
ygopro-server.js
ygopro-server.js
+18
-3
No files found.
ygopro-server.coffee
View file @
2cb22aa3
...
...
@@ -2908,7 +2908,9 @@ if settings.modules.heartbeat_detection.enabled
,
settings
.
modules
.
heartbeat_detection
.
interval
# spawn windbot
if
settings
.
modules
.
windbot
.
spawn
windbot_looplimit
=
0
spawn_windbot
=
()
->
if
/^win/
.
test
(
process
.
platform
)
windbot_bin
=
'WindBot.exe'
windbot_parameters
=
[]
...
...
@@ -2920,9 +2922,15 @@ if settings.modules.windbot.spawn
windbot_process
=
spawn
windbot_bin
,
windbot_parameters
,
{
cwd
:
'windbot'
}
windbot_process
.
on
'error'
,
(
err
)
->
log
.
warn
'WindBot ERROR'
,
err
if
windbot_looplimit
<
1000
windbot_looplimit
++
spawn_windbot
()
return
windbot_process
.
on
'exit'
,
(
code
)
->
log
.
warn
'WindBot EXIT'
,
code
if
windbot_looplimit
<
1000
windbot_looplimit
++
spawn_windbot
()
return
windbot_process
.
stdout
.
setEncoding
(
'utf8'
)
windbot_process
.
stdout
.
on
'data'
,
(
data
)
->
...
...
@@ -2933,6 +2941,9 @@ if settings.modules.windbot.spawn
log
.
warn
'WindBot Error:'
,
data
return
if
settings
.
modules
.
windbot
.
enabled
and
settings
.
modules
.
windbot
.
spawn
spawn_windbot
()
#http
if
settings
.
modules
.
http
...
...
ygopro-server.js
View file @
2cb22aa3
// Generated by CoffeeScript 1.12.7
(
function
()
{
var
CLIENT_get_authorize_key
,
CLIENT_get_kick_reconnect_target
,
CLIENT_heartbeat_register
,
CLIENT_heartbeat_unregister
,
CLIENT_import_data
,
CLIENT_is_able_to_kick_reconnect
,
CLIENT_is_able_to_reconnect
,
CLIENT_is_banned_by_mc
,
CLIENT_is_player
,
CLIENT_kick
,
CLIENT_kick_reconnect
,
CLIENT_pre_reconnect
,
CLIENT_reconnect
,
CLIENT_reconnect_register
,
CLIENT_reconnect_unregister
,
CLIENT_send_pre_reconnect_info
,
CLIENT_send_reconnect_info
,
Cloud_replay_ids
,
ROOM_all
,
ROOM_bad_ip
,
ROOM_ban_player
,
ROOM_clear_disconnect
,
ROOM_connected_ip
,
ROOM_find_by_name
,
ROOM_find_by_port
,
ROOM_find_by_title
,
ROOM_find_or_create_ai
,
ROOM_find_or_create_by_name
,
ROOM_find_or_create_random
,
ROOM_players_banned
,
ROOM_players_oppentlist
,
ROOM_unwelcome
,
ROOM_validate
,
Room
,
SERVER_clear_disconnect
,
_
,
addCallback
,
badwords
,
ban_user
,
bunyan
,
challonge
,
chat_color
,
config
,
cppversion
,
crypto
,
date
,
default_config
,
default_data
,
dialogues
,
disconnect_list
,
duel_log
,
e
,
exec
,
execFile
,
fs
,
geoip
,
get_memory_usage
,
http
,
http_server
,
https
,
https_server
,
import_datas
,
imported
,
j
,
l
,
len
,
len1
,
lflists
,
list
,
loadJSON
,
load_dialogues
,
load_tips
,
log
,
long_resolve_cards
,
memory_usage
,
merge
,
moment
,
net
,
oldbadwords
,
oldconfig
,
olddialogues
,
oldduellog
,
oldtips
,
options
,
os
,
path
,
pgClient
,
pg_client
,
pg_query
,
redis
,
redisdb
,
ref
,
ref1
,
release_disconnect
,
report_to_big_brother
,
request
,
requestListener
,
roomlist
,
setting_change
,
setting_save
,
settings
,
spawn
,
spawnSync
,
tips
,
url
,
users_cache
,
wait_room_start
,
wait_room_start_arena
,
windbot_bin
,
windbot_parameters
,
windbot_process
,
windbots
,
ygopro
,
zlib
;
var
CLIENT_get_authorize_key
,
CLIENT_get_kick_reconnect_target
,
CLIENT_heartbeat_register
,
CLIENT_heartbeat_unregister
,
CLIENT_import_data
,
CLIENT_is_able_to_kick_reconnect
,
CLIENT_is_able_to_reconnect
,
CLIENT_is_banned_by_mc
,
CLIENT_is_player
,
CLIENT_kick
,
CLIENT_kick_reconnect
,
CLIENT_pre_reconnect
,
CLIENT_reconnect
,
CLIENT_reconnect_register
,
CLIENT_reconnect_unregister
,
CLIENT_send_pre_reconnect_info
,
CLIENT_send_reconnect_info
,
Cloud_replay_ids
,
ROOM_all
,
ROOM_bad_ip
,
ROOM_ban_player
,
ROOM_clear_disconnect
,
ROOM_connected_ip
,
ROOM_find_by_name
,
ROOM_find_by_port
,
ROOM_find_by_title
,
ROOM_find_or_create_ai
,
ROOM_find_or_create_by_name
,
ROOM_find_or_create_random
,
ROOM_players_banned
,
ROOM_players_oppentlist
,
ROOM_unwelcome
,
ROOM_validate
,
Room
,
SERVER_clear_disconnect
,
_
,
addCallback
,
badwords
,
ban_user
,
bunyan
,
challonge
,
chat_color
,
config
,
cppversion
,
crypto
,
date
,
default_config
,
default_data
,
dialogues
,
disconnect_list
,
duel_log
,
e
,
exec
,
execFile
,
fs
,
geoip
,
get_memory_usage
,
http
,
http_server
,
https
,
https_server
,
import_datas
,
imported
,
j
,
l
,
len
,
len1
,
lflists
,
list
,
loadJSON
,
load_dialogues
,
load_tips
,
log
,
long_resolve_cards
,
memory_usage
,
merge
,
moment
,
net
,
oldbadwords
,
oldconfig
,
olddialogues
,
oldduellog
,
oldtips
,
options
,
os
,
path
,
pgClient
,
pg_client
,
pg_query
,
redis
,
redisdb
,
ref
,
ref1
,
release_disconnect
,
report_to_big_brother
,
request
,
requestListener
,
roomlist
,
setting_change
,
setting_save
,
settings
,
spawn
,
spawnSync
,
spawn_windbot
,
tips
,
url
,
users_cache
,
wait_room_start
,
wait_room_start_arena
,
windbot_looplimit
,
windbots
,
ygopro
,
zlib
;
net
=
require
(
'
net
'
);
...
...
@@ -3693,7 +3693,10 @@
},
settings
.
modules
.
heartbeat_detection
.
interval
);
}
if
(
settings
.
modules
.
windbot
.
spawn
)
{
windbot_looplimit
=
0
;
spawn_windbot
=
function
()
{
var
windbot_bin
,
windbot_parameters
,
windbot_process
;
if
(
/^win/
.
test
(
process
.
platform
))
{
windbot_bin
=
'
WindBot.exe
'
;
windbot_parameters
=
[];
...
...
@@ -3708,18 +3711,30 @@
});
windbot_process
.
on
(
'
error
'
,
function
(
err
)
{
log
.
warn
(
'
WindBot ERROR
'
,
err
);
if
(
windbot_looplimit
<
1000
)
{
windbot_looplimit
++
;
spawn_windbot
();
}
});
windbot_process
.
on
(
'
exit
'
,
function
(
code
)
{
log
.
warn
(
'
WindBot EXIT
'
,
code
);
if
(
windbot_looplimit
<
1000
)
{
windbot_looplimit
++
;
spawn_windbot
();
}
});
windbot_process
.
stdout
.
setEncoding
(
'
utf8
'
);
windbot_process
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
log
.
info
(
'
WindBot:
'
,
data
);
});
windbot_process
.
stderr
.
setEncoding
(
'
utf8
'
);
windbot_process
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
return
windbot_process
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
log
.
warn
(
'
WindBot Error:
'
,
data
);
});
};
if
(
settings
.
modules
.
windbot
.
enabled
&&
settings
.
modules
.
windbot
.
spawn
)
{
spawn_windbot
();
}
if
(
settings
.
modules
.
http
)
{
...
...
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