Commit d44abee2 authored by nanahira's avatar nanahira

quick vip check

parent 26b46c91
Pipeline #1234 passed with stage
in 7 minutes and 8 seconds
......@@ -140,6 +140,8 @@ CLIENT_get_save_data = global.CLIENT_get_save_data = (client) ->
return await dataManager.getUser(CLIENT_get_authorize_key(client))
CLIENT_check_vip = global.CLIENT_check_vip = (client) ->
if !settings.modules.vip.enabled or !client.vpass
return false
key = CLIENT_get_authorize_key(client)
return await dataManager.isUserVip(key)
......
......@@ -152,6 +152,9 @@
CLIENT_check_vip = global.CLIENT_check_vip = async function(client) {
var key;
if (!settings.modules.vip.enabled || !client.vpass) {
return false;
}
key = CLIENT_get_authorize_key(client);
return (await dataManager.isUserVip(key));
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment