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
839b2361
Commit
839b2361
authored
Apr 24, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround vip buy
parent
dae04eb5
Pipeline
#12035
failed with stages
in 1 minute and 2 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
data-manager/DataManager.js
data-manager/DataManager.js
+2
-1
data-manager/DataManager.ts
data-manager/DataManager.ts
+3
-2
ygopro-server.coffee
ygopro-server.coffee
+2
-0
ygopro-server.js
ygopro-server.js
+4
-1
No files found.
data-manager/DataManager.js
View file @
839b2361
...
...
@@ -614,11 +614,12 @@ class DataManager {
}
async
useVipKey
(
userKey
,
vipKeyText
)
{
let
user
=
await
this
.
getOrCreateUser
(
userKey
);
let
result
=
0
;
let
result
=
3
;
await
this
.
transaction
(
async
(
mdb
)
=>
{
try
{
const
vipKey
=
await
mdb
.
findOne
(
VipKey_1
.
VipKey
,
{
key
:
vipKeyText
,
isUsed
:
0
});
if
(
!
vipKey
)
{
result
=
0
;
return
false
;
}
const
keyType
=
vipKey
.
type
;
...
...
data-manager/DataManager.ts
View file @
839b2361
...
...
@@ -615,11 +615,12 @@ export class DataManager {
async
useVipKey
(
userKey
:
string
,
vipKeyText
:
string
)
{
let
user
=
await
this
.
getOrCreateUser
(
userKey
);
let
result
=
0
;
let
result
=
3
;
await
this
.
transaction
(
async
(
mdb
)
=>
{
try
{
const
vipKey
=
await
mdb
.
findOne
(
VipKey
,
{
key
:
vipKeyText
,
isUsed
:
0
});
if
(
!
vipKey
)
{
if
(
!
vipKey
)
{
result
=
0
;
return
false
;
}
const
keyType
=
vipKey
.
type
;
...
...
ygopro-server.coffee
View file @
839b2361
...
...
@@ -3446,6 +3446,8 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
ygopro
.
stoc_send_chat
(
client
,
"${vip_success_new_part1}"
+
client
.
name_vpass
+
"${vip_success_new_part2}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
when
2
ygopro
.
stoc_send_chat
(
client
,
"${vip_success_renew}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
when
3
ygopro
.
stoc_send_chat
(
client
,
"Internal error"
,
ygopro
.
constants
.
COLORS
.
RED
)
when
'dialogues'
if
!
isVip
CLIENT_send_vip_status
(
client
)
...
...
ygopro-server.js
View file @
839b2361
// Generated by CoffeeScript 2.
5
.1
// Generated by CoffeeScript 2.
6
.1
(
function
()
{
// 标准库
var
CLIENT_check_vip
,
CLIENT_get_absolute_pos
,
CLIENT_get_authorize_key
,
CLIENT_get_kick_reconnect_target
,
CLIENT_get_partner
,
CLIENT_get_save_data
,
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
,
CLIENT_send_replays
,
CLIENT_send_vip_status
,
CLIENT_use_cdkey
,
Q
,
ROOM_all
,
ROOM_bad_ip
,
ROOM_ban_player
,
ROOM_clear_disconnect
,
ROOM_connected_ip
,
ROOM_find_by_name
,
ROOM_find_by_pid
,
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_kick
,
ROOM_player_flee
,
ROOM_player_get_score
,
ROOM_player_lose
,
ROOM_player_win
,
ROOM_players_oppentlist
,
ROOM_unwelcome
,
ROOM_validate
,
ReplayParser
,
ResolveData
,
Room
,
SERVER_clear_disconnect
,
SERVER_kick
,
SOCKET_flush_data
,
VIP_generate_cdkeys
,
_
,
_async
,
addCallback
,
athleticChecker
,
auth
,
axios
,
badwordR
,
badwords
,
ban_user
,
bunyan
,
challonge
,
challonge_cache
,
challonge_queue_callbacks
,
checkFileExists
,
concat_name
,
createDirectoryIfNotExists
,
crypto
,
dataManager
,
deck_name_match
,
dialogues
,
disconnect_list
,
exec
,
execFile
,
fs
,
geoip
,
getDuelLogQueryFromQs
,
getSeedTimet
,
get_callback
,
get_memory_usage
,
http
,
httpRequestListener
,
importOldConfig
,
import_datas
,
init
,
is_challonge_requesting
,
lflists
,
loadJSON
,
loadJSONAsync
,
loadLFList
,
loadRemoteData
,
load_dialogues
,
load_dialogues_custom
,
load_tips
,
load_tips_zh
,
load_words
,
log
,
long_resolve_cards
,
memory_usage
,
merge
,
moment
,
moment_long_ago_string
,
moment_now
,
moment_now_string
,
net
,
netRequestHandler
,
os
,
osu
,
path
,
qs
,
real_windbot_server_ip
,
refresh_challonge_cache
,
release_disconnect
,
replaced_index
,
report_to_big_brother
,
request
,
roomlist
,
rooms_count
,
setting_change
,
setting_save
,
settings
,
spawn
,
spawnSync
,
spawn_windbot
,
tips
,
url
,
users_cache
,
util
,
wait_room_start
,
wait_room_start_arena
,
windbot_looplimit
,
windbot_process
,
windbots
,
words
,
ygopro
,
zlib
;
...
...
@@ -4609,6 +4609,9 @@
break
;
case
2
:
ygopro
.
stoc_send_chat
(
client
,
"
${vip_success_renew}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
break
;
case
3
:
ygopro
.
stoc_send_chat
(
client
,
"
Internal error
"
,
ygopro
.
constants
.
COLORS
.
RED
);
}
}
break
;
...
...
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