( context: BanConditionContext, )
| 125 | * Returns as soon as any condition triggers a ban |
| 126 | */ |
| 127 | export async function evaluateBanConditions( |
| 128 | context: BanConditionContext, |
| 129 | ): Promise<BanConditionResult> { |
| 130 | for (const condition of BAN_CONDITIONS) { |
| 131 | const result = await condition(context) |
| 132 | if (result.shouldBan) { |
| 133 | return result |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | return { |
| 138 | shouldBan: false, |
| 139 | reason: '', |
| 140 | } |
| 141 | } |
no outgoing calls
no test coverage detected