diff --git a/domains.py b/domains.py index e8da766..b9428d2 100644 --- a/domains.py +++ b/domains.py @@ -162,6 +162,21 @@ def syncDomains(): print(json.dumps(data, indent=4)) # Check if domain is registered info = data['result']['info'] + if (info == None): + # Update domain status + userDomain['status'] = 'error' + userDomain['transfering'] = 0 + userDomain['next'] = 'open for bidding' + userDomain['when'] = 0 + # Update user domains + conn = mysql.connector.connect(**db_config) + cursor = conn.cursor() + cursor.execute("UPDATE users SET domains = %s WHERE id = %s", (json.dumps(userDomains), userID)) + conn.commit() + cursor.close() + conn.close() + continue + if (userDomain['transfering'] != info['transfer']): # Update domain status if (notify('transfer', customNotifications, userID)): @@ -260,7 +275,7 @@ def send(providers,domain:str,event,userID): if (event == 'expire'): domainInfo = getCachedDomainInfo(domain) content = content.replace('{time}',blocksToTime(domainInfo['when'])) - + if (providers['email']): account.sendEmail(user['email'],title,content) if (providers['discord']): @@ -334,4 +349,6 @@ def blocksToTime(blocks): if minutes and not years and not days: time_string += f"{minutes} {'min' if minutes == 1 else 'mins'}" + if not time_string: + time_string = "now" return time_string.rstrip(', ') diff --git a/templates/assets/img/Screenshot_20231211-212453.png b/templates/assets/img/Screenshot_20231211-212453.png new file mode 100644 index 0000000..1434480 Binary files /dev/null and b/templates/assets/img/Screenshot_20231211-212453.png differ diff --git a/templates/assets/img/Screenshot_20231211-212905.png b/templates/assets/img/Screenshot_20231211-212905.png new file mode 100644 index 0000000..94a7d92 Binary files /dev/null and b/templates/assets/img/Screenshot_20231211-212905.png differ diff --git a/templates/assets/img/Screenshot_20231211-212927.png b/templates/assets/img/Screenshot_20231211-212927.png new file mode 100644 index 0000000..985e6a1 Binary files /dev/null and b/templates/assets/img/Screenshot_20231211-212927.png differ diff --git a/templates/dashboard.html b/templates/dashboard.html index 1fd9da7..a2790c7 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -133,7 +133,7 @@
Open Source
-Self Hosted
-