mirror of
https://github.com/solero/houdini.git
synced 2024-11-08 12:18:20 +00:00
Allow pre-activation trial days to be configured
This commit is contained in:
parent
415ecca766
commit
d25bfe4c98
@ -33,6 +33,8 @@ if __name__ == '__main__':
|
||||
type=int)
|
||||
login_group.add_argument('--login-failure-timer', action='store', default=3600, help='Timeout after flood limit',
|
||||
type=int)
|
||||
login_group.add_argument('--preactivation-days', action='store', default=7, help='Preactivation trial days',
|
||||
type=int)
|
||||
login_group.add_argument('-S', '--staff', action='store_true', help='Staff-only server mode')
|
||||
|
||||
logging_group = parser.add_argument_group('logging')
|
||||
|
@ -64,7 +64,7 @@ async def handle_login(p, credentials: Credentials):
|
||||
|
||||
preactivation_hours = 0
|
||||
if not data.active:
|
||||
preactivation_expiry = data.registration_date + timedelta(days=7)
|
||||
preactivation_expiry = data.registration_date + timedelta(days=p.server.config.preactivation_days)
|
||||
preactivation_expiry = preactivation_expiry - datetime.now()
|
||||
preactivation_hours = preactivation_expiry.total_seconds() // 3600
|
||||
if preactivation_hours <= 0 or p.client_type == ClientType.Legacy:
|
||||
|
Loading…
Reference in New Issue
Block a user