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
1396cf30
Commit
1396cf30
authored
Mar 29, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto lflist
parent
54869740
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
257 additions
and
222 deletions
+257
-222
config.json
config.json
+0
-1
room.coffee
room.coffee
+80
-74
room.js
room.js
+12
-4
ygopro
ygopro
+1
-1
ygopro-server.coffee
ygopro-server.coffee
+145
-141
ygopro-server.js
ygopro-server.js
+19
-1
No files found.
config.json
View file @
1396cf30
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
"enable_random_duel"
:
false
,
"enable_random_duel"
:
false
,
"mycard_auth"
:
"https://ygobbs.com"
,
"mycard_auth"
:
"https://ygobbs.com"
,
"post_start_watching"
:
true
,
"post_start_watching"
:
true
,
"TCG_banlist_id"
:
8
,
"enable_TCG_as_default"
:
false
,
"enable_TCG_as_default"
:
false
,
"http"
:
{
"http"
:
{
"port"
:
7922
,
"port"
:
7922
,
...
...
room.coffee
View file @
1396cf30
This diff is collapsed.
Click to expand it.
room.js
View file @
1396cf30
...
@@ -204,7 +204,9 @@
...
@@ -204,7 +204,9 @@
this
.
welcome
=
''
;
this
.
welcome
=
''
;
Room
.
all
.
push
(
this
);
Room
.
all
.
push
(
this
);
this
.
hostinfo
||
(
this
.
hostinfo
=
{
this
.
hostinfo
||
(
this
.
hostinfo
=
{
lflist
:
0
,
lflist
:
function
(
list
)
{
return
!
list
.
tcg
&&
list
.
date
.
isBefore
();
},
rule
:
settings
.
modules
.
enable_TCG_as_default
?
2
:
0
,
rule
:
settings
.
modules
.
enable_TCG_as_default
?
2
:
0
,
mode
:
0
,
mode
:
0
,
enable_priority
:
false
,
enable_priority
:
false
,
...
@@ -259,10 +261,14 @@
...
@@ -259,10 +261,14 @@
switch
(
rule
.
charAt
(
2
))
{
switch
(
rule
.
charAt
(
2
))
{
case
"
1
"
:
case
"
1
"
:
case
"
T
"
:
case
"
T
"
:
this
.
hostinfo
.
lflist
=
settings
.
modules
.
TCG_banlist_id
;
this
.
hostinfo
.
lflist
=
_
.
findIndex
(
settings
.
lflist
,
function
(
list
)
{
return
list
.
tcg
&&
list
.
date
.
isBefore
();
});
break
;
break
;
default
:
default
:
this
.
hostinfo
.
lflist
=
0
;
this
.
hostinfo
.
lflist
=
_
.
findIndex
(
settings
.
lflist
,
function
(
list
)
{
return
!
list
.
tcg
&&
list
.
date
.
isBefore
();
});
}
}
if
((
param
=
parseInt
(
rule
.
charAt
(
3
).
match
(
/
\d
/
)))
>=
0
)
{
if
((
param
=
parseInt
(
rule
.
charAt
(
3
).
match
(
/
\d
/
)))
>=
0
)
{
this
.
hostinfo
.
time_limit
=
param
*
60
;
this
.
hostinfo
.
time_limit
=
param
*
60
;
...
@@ -311,7 +317,9 @@
...
@@ -311,7 +317,9 @@
}
}
if
(
rule
.
match
(
/
(
^|,|,
)(
TCGONLY|TO
)(
,|,|$
)
/
))
{
if
(
rule
.
match
(
/
(
^|,|,
)(
TCGONLY|TO
)(
,|,|$
)
/
))
{
this
.
hostinfo
.
rule
=
1
;
this
.
hostinfo
.
rule
=
1
;
this
.
hostinfo
.
lflist
=
settings
.
modules
.
TCG_banlist_id
;
this
.
hostinfo
.
lflist
=
_
.
findIndex
(
settings
.
lflist
,
function
(
list
)
{
return
list
.
tcg
&&
list
.
date
.
isBefore
();
});
}
}
if
(
rule
.
match
(
/
(
^|,|,
)(
OCGONLY|OO
)(
,|,|$
)
/
))
{
if
(
rule
.
match
(
/
(
^|,|,
)(
OCGONLY|OO
)(
,|,|$
)
/
))
{
this
.
hostinfo
.
rule
=
0
;
this
.
hostinfo
.
rule
=
0
;
...
...
ygopro
@
1da1c4fb
Subproject commit
58be174a410a1595e36105dc3ba6951ae70815ee
Subproject commit
1da1c4fbbb8dedf2c8655d9055e417b85548e1cf
ygopro-server.coffee
View file @
1396cf30
This diff is collapsed.
Click to expand it.
ygopro-server.js
View file @
1396cf30
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.10.0
(
function
()
{
(
function
()
{
var
Graveyard
,
Room
,
_
,
bunyan
,
crypto
,
debug
,
dialogues
,
execFile
,
fs
,
http
,
http_server
,
https
,
https_server
,
l
og
,
moment
,
net
,
options
,
os
,
path
,
pg
,
request
,
requestListener
,
roomlist
,
settings
,
tips
,
tribute
,
url
,
users_cache
,
wait_room_start
,
ygopro
;
var
Graveyard
,
Room
,
_
,
bunyan
,
crypto
,
debug
,
dialogues
,
execFile
,
fs
,
http
,
http_server
,
https
,
https_server
,
l
flist
,
list
,
log
,
matched
,
moment
,
net
,
options
,
os
,
path
,
pg
,
request
,
requestListener
,
roomlist
,
settings
,
tips
,
tribute
,
url
,
users_cache
,
wait_room_start
,
ygopro
;
net
=
require
(
'
net
'
);
net
=
require
(
'
net
'
);
...
@@ -40,6 +40,21 @@
...
@@ -40,6 +40,21 @@
settings
.
version
=
parseInt
(
fs
.
readFileSync
(
'
ygopro/gframe/game.cpp
'
,
'
utf8
'
).
match
(
/PRO_VERSION =
([
x
\d]
+
)
/
)[
1
],
'
16
'
);
settings
.
version
=
parseInt
(
fs
.
readFileSync
(
'
ygopro/gframe/game.cpp
'
,
'
utf8
'
).
match
(
/PRO_VERSION =
([
x
\d]
+
)
/
)[
1
],
'
16
'
);
lflist
=
(
function
()
{
var
k
,
len
,
ref
,
results
;
ref
=
fs
.
readFileSync
(
'
ygopro/lflist.conf
'
,
'
utf8
'
).
match
(
/!
[\d\.]
+
(?:
TCG
)?
/g
);
results
=
[];
for
(
k
=
0
,
len
=
ref
.
length
;
k
<
len
;
k
++
)
{
list
=
ref
[
k
];
matched
=
list
.
match
(
/!
([\d\.]
+
)(?:
(
TCG
))?
/
);
results
.
push
({
date
:
moment
(
matched
[
1
]),
tcg
:
!!
matched
[
2
]
});
}
return
results
;
})();
ygopro
=
require
(
'
./ygopro.js
'
);
ygopro
=
require
(
'
./ygopro.js
'
);
Room
=
require
(
'
./room.js
'
);
Room
=
require
(
'
./room.js
'
);
...
@@ -442,6 +457,9 @@
...
@@ -442,6 +457,9 @@
start_hand
:
opt3
>>
4
,
start_hand
:
opt3
>>
4
,
draw_count
:
opt3
&
0xF
draw_count
:
opt3
&
0xF
};
};
this
.
hostinfo
.
lflist
=
_
.
findIndex
(
settings
.
lflist
,
function
(
list
)
{
return
((
rule
===
1
)
===
list
.
tcg
)
&&
list
.
date
.
isBefore
();
});
room
=
new
Room
(
name
,
options
);
room
=
new
Room
(
name
,
options
);
room
.
title
=
info
.
pass
.
slice
(
8
).
replace
(
String
.
fromCharCode
(
0xFEFF
),
'
'
);
room
.
title
=
info
.
pass
.
slice
(
8
).
replace
(
String
.
fromCharCode
(
0xFEFF
),
'
'
);
room
[
"
private
"
]
=
action
===
2
;
room
[
"
private
"
]
=
action
===
2
;
...
...
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