Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
syntax_j
mycard
Commits
b10efc6e
Commit
b10efc6e
authored
Oct 25, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
css
parent
cf5f160b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
app/apps.component.css
app/apps.component.css
+4
-0
app/ygopro.component.ts
app/ygopro.component.ts
+17
-3
No files found.
app/apps.component.css
View file @
b10efc6e
...
...
@@ -18,4 +18,8 @@ a {
.active
>
a
{
color
:
#fff
;
}
span
{
margin-left
:
8px
;
}
\ No newline at end of file
app/ygopro.component.ts
View file @
b10efc6e
...
...
@@ -240,11 +240,25 @@ export class YGOProComponent implements OnInit {
let
room_id
=
crypto
.
createHash
(
'
md5
'
).
update
(
password
+
this
.
user
.
username
).
digest
(
'
base64
'
).
slice
(
0
,
10
).
replace
(
'
+
'
,
'
-
'
).
replace
(
'
/
'
,
'
_
'
)
this
.
join
(
password
,
this
.
servers
[
0
]);
$
(
'
#game-create-modal
'
).
modal
(
'
hide
'
);
}
join_room
(
room
)
{
this
.
join
(
room
.
id
,
room
.
server
);
let
options_buffer
=
new
Buffer
(
6
);
options_buffer
.
writeUInt8
(
3
<<
4
,
1
);
let
checksum
=
0
;
for
(
var
i
=
1
;
i
<
options_buffer
.
length
;
i
++
)
{
checksum
-=
options_buffer
.
readUInt8
(
i
)
}
options_buffer
.
writeUInt8
(
checksum
&
0xFF
,
0
);
let
secret
=
this
.
user
.
external_id
%
65535
+
1
;
for
(
i
=
0
;
i
<
options_buffer
.
length
;
i
+=
2
)
{
options_buffer
.
writeUInt16LE
(
options_buffer
.
readUInt16LE
(
i
)
^
secret
,
i
)
}
let
password
=
options_buffer
.
toString
(
'
base64
'
)
+
room
.
id
;
this
.
join
(
password
,
room
.
server
);
}
}
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