MJ: attack coordinator update / various fixes . captcha and back button and jitterloop 2 secs

This commit is contained in:
2026-05-03 12:40:20 +03:00
parent 47381a9304
commit eb31072c87
16 changed files with 1492 additions and 31 deletions

View File

@@ -147,13 +147,15 @@ def options():
except Exception:
pass
members.append({
'id': row['id'],
'player_id': row['player_id'],
'player_name': row['player_name'] or 'Άγνωστος',
'joined_at': row['joined_at'][:10] if row['joined_at'] else '',
'is_online': is_online,
'feat_farm': 'farm' in (row['features'] or 'farm,admin'),
'feat_admin': 'admin' in (row['features'] or 'farm,admin'),
'id': row['id'],
'player_id': row['player_id'],
'player_name': row['player_name'] or 'Άγνωστος',
'joined_at': row['joined_at'][:10] if row['joined_at'] else '',
'is_online': is_online,
'feat_farm': 'farm' in (row['features'] or 'farm,admin'),
'feat_admin': 'admin' in (row['features'] or 'farm,admin'),
'feat_atk_planner': 'attack_planner' in (row['features'] or ''),
'feat_atk_planner_admin': 'attack_planner_admin' in (row['features'] or ''),
})
conn.close()
@@ -232,9 +234,12 @@ def remove_member(player_id):
@auth.route('/auth/clan/update-features/<player_id>', methods=['POST'])
@login_required
def update_member_features(player_id):
farm = 'farm' if request.form.get('farm') else None
admin = 'admin' if request.form.get('admin') else None
features = ','.join(f for f in [farm, admin] if f) or ''
farm = 'farm' if request.form.get('farm') else None
admin = 'admin' if request.form.get('admin') else None
atk_planner = 'attack_planner' if request.form.get('attack_planner') else None
atk_planner_admin = 'attack_planner_admin' if request.form.get('attack_planner_admin') else None
features = ','.join(f for f in [farm, admin, atk_planner, atk_planner_admin] if f) or ''
conn = get_db()
clan = conn.execute(
@@ -250,6 +255,7 @@ def update_member_features(player_id):
return redirect(url_for('auth.options'))
# ------------------------------------------------------------------
# POST /auth/clan/add-admin
# ------------------------------------------------------------------