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
a4bb6336
Commit
a4bb6336
authored
Oct 20, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into tcg_random
parents
80fe6aef
b06297ba
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
85 additions
and
56 deletions
+85
-56
config_build/config.json
config_build/config.json
+1
-1
docs/install_centos_6.sh
docs/install_centos_6.sh
+2
-8
docs/install_centos_7.sh
docs/install_centos_7.sh
+2
-8
docs/install_ubnutu_14.sh
docs/install_ubnutu_14.sh
+2
-8
docs/install_ubnutu_16.sh
docs/install_ubnutu_16.sh
+2
-8
docs/install_ubnutu_18.sh
docs/install_ubnutu_18.sh
+2
-8
ygopro-pre.js
ygopro-pre.js
+2
-0
ygopro-server.coffee
ygopro-server.coffee
+18
-0
ygopro-server.js
ygopro-server.js
+54
-15
No files found.
config_build/config.json
View file @
a4bb6336
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
"command"
:
"bash"
,
"command"
:
"bash"
,
"args"
:
[
"args"
:
[
"-c"
,
"-c"
,
"cd ocgcore ; git pull origin master ; git reset --hard FETCH_HEAD ; cd ../script ; git pull origin master ; git reset --hard FETCH_HEAD ; cd .. ; premake5 gmake ; cd build ; make config=release ; cd .. ; strip ygopro"
"cd ocgcore ; git pull origin master ; git reset --hard FETCH_HEAD ; cd ../script ; git pull origin master ; git reset --hard FETCH_HEAD ; cd .. ;
~/
premake5 gmake ; cd build ; make config=release ; cd .. ; strip ygopro"
],
],
"path"
:
"./ygopro/"
"path"
:
"./ygopro/"
}
}
...
...
docs/install_centos_6.sh
View file @
a4bb6336
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
cd
..
cd
..
pm2 start redis-server
pm2 start redis-server
wget
'http://www.lua.org/ftp/lua-5.3.5.tar.gz'
--no-check-certificate
tar
zxf lua-5.3.5.tar.gz
cd
lua-5.3.5
sudo
make linux
test install
cd
..
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
sudo cp
-rf
premake5 /usr/bin/
cp
-rf
premake5 ~
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
tar
xf libevent-2.0.22-stable.tar.gz
tar
xf libevent-2.0.22-stable.tar.gz
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
cd
ygopro/
cd
ygopro/
git submodule foreach git checkout master
git submodule foreach git checkout master
premake5 gmake
~/
premake5 gmake
cd
build/
cd
build/
make
config
=
release
make
config
=
release
cd
..
cd
..
...
...
docs/install_centos_7.sh
View file @
a4bb6336
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
cd
..
cd
..
pm2 start redis-server
pm2 start redis-server
wget
'http://www.lua.org/ftp/lua-5.3.5.tar.gz'
--no-check-certificate
tar
zxf lua-5.3.5.tar.gz
cd
lua-5.3.5
sudo
make linux
test install
cd
..
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
sudo cp
-rf
premake5 /usr/bin/
cp
-rf
premake5 ~
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
tar
xf libevent-2.0.22-stable.tar.gz
tar
xf libevent-2.0.22-stable.tar.gz
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
cd
ygopro/
cd
ygopro/
git submodule foreach git checkout master
git submodule foreach git checkout master
premake5 gmake
~/
premake5 gmake
cd
build/
cd
build/
make
config
=
release
make
config
=
release
cd
..
cd
..
...
...
docs/install_ubnutu_14.sh
View file @
a4bb6336
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
cd
..
cd
..
pm2 start redis-server
pm2 start redis-server
wget
'http://www.lua.org/ftp/lua-5.3.5.tar.gz'
--no-check-certificate
tar
zxf lua-5.3.5.tar.gz
cd
lua-5.3.5
sudo
make linux
test install
cd
..
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
sudo cp
-rf
premake5 /usr/bin/
cp
-rf
premake5 ~
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
tar
xf libevent-2.0.22-stable.tar.gz
tar
xf libevent-2.0.22-stable.tar.gz
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
cd
ygopro/
cd
ygopro/
git submodule foreach git checkout master
git submodule foreach git checkout master
premake5 gmake
~/
premake5 gmake
cd
build/
cd
build/
make
config
=
release
make
config
=
release
cd
..
cd
..
...
...
docs/install_ubnutu_16.sh
View file @
a4bb6336
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
...
@@ -33,14 +33,8 @@ sudo cp -rf src/redis-server /usr/bin/
cd
..
cd
..
pm2 start redis-server
pm2 start redis-server
wget
'http://www.lua.org/ftp/lua-5.3.5.tar.gz'
--no-check-certificate
tar
zxf lua-5.3.5.tar.gz
cd
lua-5.3.5
sudo
make linux
test install
cd
..
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
sudo cp
-rf
premake5 /usr/bin/
cp
-rf
premake5 ~
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
tar
xf libevent-2.0.22-stable.tar.gz
tar
xf libevent-2.0.22-stable.tar.gz
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
...
@@ -65,7 +59,7 @@ mkdir decks decks_save replays
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
cd
ygopro/
cd
ygopro/
git submodule foreach git checkout master
git submodule foreach git checkout master
premake5 gmake
~/
premake5 gmake
cd
build/
cd
build/
make
config
=
release
make
config
=
release
cd
..
cd
..
...
...
docs/install_ubnutu_18.sh
View file @
a4bb6336
...
@@ -32,14 +32,8 @@ sudo cp -rf src/redis-server /usr/bin/
...
@@ -32,14 +32,8 @@ sudo cp -rf src/redis-server /usr/bin/
cd
..
cd
..
pm2 start redis-server
pm2 start redis-server
wget
'http://www.lua.org/ftp/lua-5.3.5.tar.gz'
--no-check-certificate
tar
zxf lua-5.3.5.tar.gz
cd
lua-5.3.5
sudo
make linux
test install
cd
..
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
wget
-O
- https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz |
tar
zfx -
sudo cp
-rf
premake5 /usr/bin/
cp
-rf
premake5 ~
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
wget
'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz'
-O
libevent-2.0.22-stable.tar.gz
--no-check-certificate
tar
xf libevent-2.0.22-stable.tar.gz
tar
xf libevent-2.0.22-stable.tar.gz
...
@@ -64,7 +58,7 @@ mkdir decks decks_save replays
...
@@ -64,7 +58,7 @@ mkdir decks decks_save replays
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
git clone https://github.com/purerosefallen/ygopro
--branch
=
server
--recursive
cd
ygopro/
cd
ygopro/
git submodule foreach git checkout master
git submodule foreach git checkout master
premake5 gmake
~/~/
premake5 gmake
cd
build/
cd
build/
make
config
=
release
make
config
=
release
cd
..
cd
..
...
...
ygopro-pre.js
View file @
a4bb6336
...
@@ -208,9 +208,11 @@ var writeToFile = function(message) {
...
@@ -208,9 +208,11 @@ var writeToFile = function(message) {
}
}
fs
.
writeFileSync
(
config
.
html_path
+
config
.
html_filename
,
fileContent
);
fs
.
writeFileSync
(
config
.
html_path
+
config
.
html_filename
,
fileContent
);
sendResponse
(
"
列表更新完成。
"
);
sendResponse
(
"
列表更新完成。
"
);
/*
if (!config.cdn.enabled) {
if (!config.cdn.enabled) {
copyImages();
copyImages();
}
}
*/
}
}
//读取指定文件夹里所有数据库,异步
//读取指定文件夹里所有数据库,异步
...
...
ygopro-server.coffee
View file @
a4bb6336
...
@@ -1790,6 +1790,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -1790,6 +1790,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
client
.
setTimeout
(
300000
)
#连接后超时5分钟
client
.
setTimeout
(
300000
)
#连接后超时5分钟
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
)
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
)
client
.
is_post_watcher
=
true
client
.
is_post_watcher
=
true
if
settings
.
modules
.
vip
.
enabled
and
client
.
vip
and
vip_info
.
players
[
client
.
name
].
words
for
line
in
_
.
lines
vip_info
.
players
[
client
.
name
].
words
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
)
else
if
settings
.
modules
.
words
.
enabled
and
words
.
words
[
client
.
name
]
for
line
in
_
.
lines
words
.
words
[
client
.
name
][
Math
.
floor
(
Math
.
random
()
*
words
.
words
[
client
.
name
].
length
)]
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${watch_join}"
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${watch_join}"
)
room
.
watchers
.
push
client
room
.
watchers
.
push
client
ygopro
.
stoc_send_chat
(
client
,
"${watch_watching}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
ygopro
.
stoc_send_chat
(
client
,
"${watch_watching}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
...
@@ -1910,6 +1916,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -1910,6 +1916,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
#client.setTimeout(300000) #连接后超时5分钟
#client.setTimeout(300000) #连接后超时5分钟
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
)
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
)
client
.
is_post_watcher
=
true
client
.
is_post_watcher
=
true
if
settings
.
modules
.
vip
.
enabled
and
client
.
vip
and
vip_info
.
players
[
client
.
name
].
words
for
line
in
_
.
lines
vip_info
.
players
[
client
.
name
].
words
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
)
else
if
settings
.
modules
.
words
.
enabled
and
words
.
words
[
client
.
name
]
for
line
in
_
.
lines
words
.
words
[
client
.
name
][
Math
.
floor
(
Math
.
random
()
*
words
.
words
[
client
.
name
].
length
)]
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${watch_join}"
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${watch_join}"
)
room
.
watchers
.
push
client
room
.
watchers
.
push
client
ygopro
.
stoc_send_chat
(
client
,
"${watch_watching}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
ygopro
.
stoc_send_chat
(
client
,
"${watch_watching}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
...
@@ -1993,6 +2005,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -1993,6 +2005,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
client
.
setTimeout
(
300000
)
#连接后超时5分钟
client
.
setTimeout
(
300000
)
#连接后超时5分钟
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
)
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
)
client
.
is_post_watcher
=
true
client
.
is_post_watcher
=
true
if
settings
.
modules
.
vip
.
enabled
and
client
.
vip
and
vip_info
.
players
[
client
.
name
].
words
for
line
in
_
.
lines
vip_info
.
players
[
client
.
name
].
words
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
)
else
if
settings
.
modules
.
words
.
enabled
and
words
.
words
[
client
.
name
]
for
line
in
_
.
lines
words
.
words
[
client
.
name
][
Math
.
floor
(
Math
.
random
()
*
words
.
words
[
client
.
name
].
length
)]
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${watch_join}"
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${watch_join}"
)
room
.
watchers
.
push
client
room
.
watchers
.
push
client
ygopro
.
stoc_send_chat
(
client
,
"${watch_watching}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
ygopro
.
stoc_send_chat
(
client
,
"${watch_watching}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
...
...
ygopro-server.js
View file @
a4bb6336
...
@@ -2050,7 +2050,7 @@
...
@@ -2050,7 +2050,7 @@
});
});
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
var
check
,
decrypted_buffer
,
finish
,
i
,
id
,
len2
,
len3
,
len4
,
m
,
n
,
name
,
o
,
pre_room
,
ref3
,
ref4
,
ref5
,
replay_id
,
room
,
secret
;
var
check
,
decrypted_buffer
,
finish
,
i
,
id
,
len2
,
len3
,
len4
,
len5
,
len6
,
line
,
m
,
n
,
name
,
o
,
p
,
pre_room
,
q
,
ref3
,
ref4
,
ref5
,
ref6
,
ref7
,
replay_id
,
room
,
secret
;
info
.
pass
=
info
.
pass
.
trim
();
info
.
pass
=
info
.
pass
.
trim
();
client
.
pass
=
info
.
pass
;
client
.
pass
=
info
.
pass
;
if
(
CLIENT_is_able_to_reconnect
(
client
)
||
CLIENT_is_able_to_kick_reconnect
(
client
))
{
if
(
CLIENT_is_able_to_reconnect
(
client
)
||
CLIENT_is_able_to_kick_reconnect
(
client
))
{
...
@@ -2132,7 +2132,7 @@
...
@@ -2132,7 +2132,7 @@
return
(
checksum
&
0xFF
)
===
0
;
return
(
checksum
&
0xFF
)
===
0
;
};
};
finish
=
function
(
buffer
)
{
finish
=
function
(
buffer
)
{
var
action
,
len2
,
m
,
name
,
opt1
,
opt2
,
opt3
,
options
,
ref3
,
room
,
title
;
var
action
,
len2
,
len3
,
len4
,
line
,
m
,
n
,
name
,
o
,
opt1
,
opt2
,
opt3
,
options
,
ref3
,
ref4
,
ref5
,
room
,
title
;
if
(
client
.
closed
)
{
if
(
client
.
closed
)
{
return
;
return
;
}
}
...
@@ -2213,12 +2213,25 @@
...
@@ -2213,12 +2213,25 @@
client
.
setTimeout
(
300000
);
client
.
setTimeout
(
300000
);
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
client
.
is_post_watcher
=
true
;
client
.
is_post_watcher
=
true
;
if
(
settings
.
modules
.
vip
.
enabled
&&
client
.
vip
&&
vip_info
.
players
[
client
.
name
].
words
)
{
ref3
=
_
.
lines
(
vip_info
.
players
[
client
.
name
].
words
);
for
(
m
=
0
,
len2
=
ref3
.
length
;
m
<
len2
;
m
++
)
{
line
=
ref3
[
m
];
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
);
}
}
else
if
(
settings
.
modules
.
words
.
enabled
&&
words
.
words
[
client
.
name
])
{
ref4
=
_
.
lines
(
words
.
words
[
client
.
name
][
Math
.
floor
(
Math
.
random
()
*
words
.
words
[
client
.
name
].
length
)]);
for
(
n
=
0
,
len3
=
ref4
.
length
;
n
<
len3
;
n
++
)
{
line
=
ref4
[
n
];
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
);
}
}
ygopro
.
stoc_send_chat_to_room
(
room
,
client
.
name
+
"
${watch_join}
"
);
ygopro
.
stoc_send_chat_to_room
(
room
,
client
.
name
+
"
${watch_join}
"
);
room
.
watchers
.
push
(
client
);
room
.
watchers
.
push
(
client
);
ygopro
.
stoc_send_chat
(
client
,
"
${watch_watching}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ygopro
.
stoc_send_chat
(
client
,
"
${watch_watching}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ref
3
=
room
.
watcher_buffers
;
ref
5
=
room
.
watcher_buffers
;
for
(
m
=
0
,
len2
=
ref3
.
length
;
m
<
len2
;
m
++
)
{
for
(
o
=
0
,
len4
=
ref5
.
length
;
o
<
len4
;
o
++
)
{
buffer
=
ref
3
[
m
];
buffer
=
ref
5
[
o
];
client
.
write
(
buffer
);
client
.
write
(
buffer
);
}
}
}
else
{
}
else
{
...
@@ -2322,7 +2335,7 @@
...
@@ -2322,7 +2335,7 @@
challonge
.
matches
.
_index
({
challonge
.
matches
.
_index
({
id
:
settings
.
modules
.
challonge
.
tournament_id
,
id
:
settings
.
modules
.
challonge
.
tournament_id
,
callback
:
function
(
err
,
data
)
{
callback
:
function
(
err
,
data
)
{
var
len4
,
len5
,
match
,
o
,
p
,
player
,
ref5
,
ref6
;
var
len4
,
len5
,
len6
,
len7
,
line
,
match
,
o
,
p
,
player
,
q
,
r
,
ref5
,
ref6
,
ref7
,
ref8
;
if
(
client
.
closed
)
{
if
(
client
.
closed
)
{
return
;
return
;
}
}
...
@@ -2358,12 +2371,25 @@
...
@@ -2358,12 +2371,25 @@
if
(
settings
.
modules
.
cloud_replay
.
enable_halfway_watch
&&
!
room
.
no_watch
)
{
if
(
settings
.
modules
.
cloud_replay
.
enable_halfway_watch
&&
!
room
.
no_watch
)
{
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
client
.
is_post_watcher
=
true
;
client
.
is_post_watcher
=
true
;
if
(
settings
.
modules
.
vip
.
enabled
&&
client
.
vip
&&
vip_info
.
players
[
client
.
name
].
words
)
{
ref5
=
_
.
lines
(
vip_info
.
players
[
client
.
name
].
words
);
for
(
o
=
0
,
len4
=
ref5
.
length
;
o
<
len4
;
o
++
)
{
line
=
ref5
[
o
];
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
);
}
}
else
if
(
settings
.
modules
.
words
.
enabled
&&
words
.
words
[
client
.
name
])
{
ref6
=
_
.
lines
(
words
.
words
[
client
.
name
][
Math
.
floor
(
Math
.
random
()
*
words
.
words
[
client
.
name
].
length
)]);
for
(
p
=
0
,
len5
=
ref6
.
length
;
p
<
len5
;
p
++
)
{
line
=
ref6
[
p
];
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
);
}
}
ygopro
.
stoc_send_chat_to_room
(
room
,
client
.
name
+
"
${watch_join}
"
);
ygopro
.
stoc_send_chat_to_room
(
room
,
client
.
name
+
"
${watch_join}
"
);
room
.
watchers
.
push
(
client
);
room
.
watchers
.
push
(
client
);
ygopro
.
stoc_send_chat
(
client
,
"
${watch_watching}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ygopro
.
stoc_send_chat
(
client
,
"
${watch_watching}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ref
5
=
room
.
watcher_buffers
;
ref
7
=
room
.
watcher_buffers
;
for
(
o
=
0
,
len4
=
ref5
.
length
;
o
<
len4
;
o
++
)
{
for
(
q
=
0
,
len6
=
ref7
.
length
;
q
<
len6
;
q
++
)
{
buffer
=
ref
5
[
o
];
buffer
=
ref
7
[
q
];
client
.
write
(
buffer
);
client
.
write
(
buffer
);
}
}
}
else
{
}
else
{
...
@@ -2372,9 +2398,9 @@
...
@@ -2372,9 +2398,9 @@
}
else
if
(
room
.
no_watch
&&
room
.
players
.
length
>=
(
room
.
hostinfo
.
mode
===
2
?
4
:
2
))
{
}
else
if
(
room
.
no_watch
&&
room
.
players
.
length
>=
(
room
.
hostinfo
.
mode
===
2
?
4
:
2
))
{
ygopro
.
stoc_die
(
client
,
"
${watch_denied_room}
"
);
ygopro
.
stoc_die
(
client
,
"
${watch_denied_room}
"
);
}
else
{
}
else
{
ref
6
=
room
.
get_playing_player
();
ref
8
=
room
.
get_playing_player
();
for
(
p
=
0
,
len5
=
ref6
.
length
;
p
<
len5
;
p
++
)
{
for
(
r
=
0
,
len7
=
ref8
.
length
;
r
<
len7
;
r
++
)
{
player
=
ref
6
[
p
];
player
=
ref
8
[
r
];
if
(
!
(
player
&&
player
!==
client
&&
player
.
challonge_info
.
id
===
client
.
challonge_info
.
id
))
{
if
(
!
(
player
&&
player
!==
client
&&
player
.
challonge_info
.
id
===
client
.
challonge_info
.
id
))
{
continue
;
continue
;
}
}
...
@@ -2436,12 +2462,25 @@
...
@@ -2436,12 +2462,25 @@
client
.
setTimeout
(
300000
);
client
.
setTimeout
(
300000
);
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
client
.
is_post_watcher
=
true
;
client
.
is_post_watcher
=
true
;
if
(
settings
.
modules
.
vip
.
enabled
&&
client
.
vip
&&
vip_info
.
players
[
client
.
name
].
words
)
{
ref5
=
_
.
lines
(
vip_info
.
players
[
client
.
name
].
words
);
for
(
o
=
0
,
len4
=
ref5
.
length
;
o
<
len4
;
o
++
)
{
line
=
ref5
[
o
];
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
);
}
}
else
if
(
settings
.
modules
.
words
.
enabled
&&
words
.
words
[
client
.
name
])
{
ref6
=
_
.
lines
(
words
.
words
[
client
.
name
][
Math
.
floor
(
Math
.
random
()
*
words
.
words
[
client
.
name
].
length
)]);
for
(
p
=
0
,
len5
=
ref6
.
length
;
p
<
len5
;
p
++
)
{
line
=
ref6
[
p
];
ygopro
.
stoc_send_chat_to_room
(
room
,
line
,
ygopro
.
constants
.
COLORS
.
PINK
);
}
}
ygopro
.
stoc_send_chat_to_room
(
room
,
client
.
name
+
"
${watch_join}
"
);
ygopro
.
stoc_send_chat_to_room
(
room
,
client
.
name
+
"
${watch_join}
"
);
room
.
watchers
.
push
(
client
);
room
.
watchers
.
push
(
client
);
ygopro
.
stoc_send_chat
(
client
,
"
${watch_watching}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ygopro
.
stoc_send_chat
(
client
,
"
${watch_watching}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ref
5
=
room
.
watcher_buffers
;
ref
7
=
room
.
watcher_buffers
;
for
(
o
=
0
,
len4
=
ref5
.
length
;
o
<
len4
;
o
++
)
{
for
(
q
=
0
,
len6
=
ref7
.
length
;
q
<
len6
;
q
++
)
{
buffer
=
ref
5
[
o
];
buffer
=
ref
7
[
q
];
client
.
write
(
buffer
);
client
.
write
(
buffer
);
}
}
}
else
{
}
else
{
...
...
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