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
cafb1b3b
Commit
cafb1b3b
authored
Sep 29, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5d949d4b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
roomlist.coffee
roomlist.coffee
+2
-2
roomlist.js
roomlist.js
+5
-6
ygopro-server.coffee
ygopro-server.coffee
+1
-1
ygopro-server.js
ygopro-server.js
+1
-1
No files found.
roomlist.coffee
View file @
cafb1b3b
...
@@ -10,14 +10,14 @@ room_data = (room)->
...
@@ -10,14 +10,14 @@ room_data = (room)->
users
:
({
username
:
client
.
name
,
position
:
client
.
pos
}
for
client
in
room
.
players
),
users
:
({
username
:
client
.
name
,
position
:
client
.
pos
}
for
client
in
room
.
players
),
options
:
room
.
hostinfo
options
:
room
.
hostinfo
init
=
(
http_server
,
R
oom
)
->
init
=
(
http_server
,
R
OOM_all
)
->
server
=
new
WebSocketServer
server
=
new
WebSocketServer
server
:
http_server
server
:
http_server
server
.
on
'connection'
,
(
connection
)
->
server
.
on
'connection'
,
(
connection
)
->
connection
.
send
JSON
.
stringify
connection
.
send
JSON
.
stringify
event
:
'init'
event
:
'init'
data
:
room_data
(
room
)
for
room
in
R
oom
.
all
when
room
.
established
and
!
room
.
private
and
!
room
.
started
data
:
room_data
(
room
)
for
room
in
R
OOM_all
when
room
and
room
.
established
and
!
room
.
private
and
!
room
.
started
create
=
(
room
)
->
create
=
(
room
)
->
broadcast
(
'create'
,
room_data
(
room
))
broadcast
(
'create'
,
room_data
(
room
))
...
...
roomlist.js
View file @
cafb1b3b
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
};
};
};
};
init
=
function
(
http_server
,
R
oom
)
{
init
=
function
(
http_server
,
R
OOM_all
)
{
server
=
new
WebSocketServer
({
server
=
new
WebSocketServer
({
server
:
http_server
server
:
http_server
});
});
...
@@ -40,12 +40,11 @@
...
@@ -40,12 +40,11 @@
return
connection
.
send
(
JSON
.
stringify
({
return
connection
.
send
(
JSON
.
stringify
({
event
:
'
init
'
,
event
:
'
init
'
,
data
:
(
function
()
{
data
:
(
function
()
{
var
i
,
len
,
ref
,
results
;
var
i
,
len
,
results
;
ref
=
Room
.
all
;
results
=
[];
results
=
[];
for
(
i
=
0
,
len
=
ref
.
length
;
i
<
len
;
i
++
)
{
for
(
i
=
0
,
len
=
ROOM_all
.
length
;
i
<
len
;
i
++
)
{
room
=
ref
[
i
];
room
=
ROOM_all
[
i
];
if
(
room
.
established
&&
!
room
[
"
private
"
]
&&
!
room
.
started
)
{
if
(
room
&&
room
.
established
&&
!
room
[
"
private
"
]
&&
!
room
.
started
)
{
results
.
push
(
room_data
(
room
));
results
.
push
(
room_data
(
room
));
}
}
}
}
...
...
ygopro-server.coffee
View file @
cafb1b3b
...
@@ -1639,5 +1639,5 @@ if settings.modules.http
...
@@ -1639,5 +1639,5 @@ if settings.modules.http
cert
:
fs
.
readFileSync
(
settings
.
modules
.
http
.
ssl
.
cert
)
cert
:
fs
.
readFileSync
(
settings
.
modules
.
http
.
ssl
.
cert
)
key
:
fs
.
readFileSync
(
settings
.
modules
.
http
.
ssl
.
key
)
key
:
fs
.
readFileSync
(
settings
.
modules
.
http
.
ssl
.
key
)
https_server
=
https
.
createServer
(
options
,
requestListener
)
https_server
=
https
.
createServer
(
options
,
requestListener
)
roomlist
.
init
https_server
,
R
oom
roomlist
.
init
https_server
,
R
OOM_all
https_server
.
listen
settings
.
modules
.
http
.
ssl
.
port
https_server
.
listen
settings
.
modules
.
http
.
ssl
.
port
\ No newline at end of file
ygopro-server.js
View file @
cafb1b3b
...
@@ -2049,7 +2049,7 @@
...
@@ -2049,7 +2049,7 @@
key
:
fs
.
readFileSync
(
settings
.
modules
.
http
.
ssl
.
key
)
key
:
fs
.
readFileSync
(
settings
.
modules
.
http
.
ssl
.
key
)
};
};
https_server
=
https
.
createServer
(
options
,
requestListener
);
https_server
=
https
.
createServer
(
options
,
requestListener
);
roomlist
.
init
(
https_server
,
R
oom
);
roomlist
.
init
(
https_server
,
R
OOM_all
);
https_server
.
listen
(
settings
.
modules
.
http
.
ssl
.
port
);
https_server
.
listen
(
settings
.
modules
.
http
.
ssl
.
port
);
}
}
}
}
...
...
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