Major improvement, security handling, file handling +fixes
This commit is contained in:
@@ -147,3 +147,21 @@ WHERE id = ?2;
|
||||
This is used both for:
|
||||
- **Automatic expiration** (`revoked_by = 0`)
|
||||
- **Manual moderator revocation** (`revoked_by = moderator_user_id`)
|
||||
|
||||
---
|
||||
|
||||
## Global Ban Configuration
|
||||
|
||||
Under `[groups]` in the config, the optional `global_ban` flag (default `false`) controls whether punishment commands (`/sban`, `/smute`, `/mute`, `/pban`) are propagated across all known chats where the bot is an administrator.
|
||||
|
||||
```toml
|
||||
[groups]
|
||||
admin_group_ids = [-1001234567890]
|
||||
review_group_ids = [-1009876543210]
|
||||
global_ban = false
|
||||
```
|
||||
|
||||
- When `global_ban = true`, issuing a punishment in any admin group is intended to apply the same action to every known chat (source chats, destination chats, review groups, and configured `admin_group_ids` / `review_group_ids`) where it has admin rights.
|
||||
- When `global_ban = false` (default), punishments are local to the group where the command was issued.
|
||||
|
||||
**Note:** When `global_ban = true`, the bot propagates the punishment to every configured `admin_group_ids`, `review_group_ids`, and all active forward chats (source, destination, and review groups) where it has administrator rights. Each propagated action is recorded as a separate `punishments` row.
|
||||
|
||||
Reference in New Issue
Block a user