mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-24 06:09:15 +00:00
🐛 Fix sudo filters do not filter self
This commit is contained in:
parent
a617027a00
commit
f7416d4a21
@ -91,7 +91,7 @@ def listener(**args):
|
|||||||
else:
|
else:
|
||||||
base_filters = filters.all
|
base_filters = filters.all
|
||||||
permission_name = get_permission_name(is_plugin, need_admin, command)
|
permission_name = get_permission_name(is_plugin, need_admin, command)
|
||||||
sudo_filters = sudo_filter(permission_name) & ~filters.via_bot
|
sudo_filters = sudo_filter(permission_name) & ~filters.via_bot & ~filters.me
|
||||||
if ignore_forwarded:
|
if ignore_forwarded:
|
||||||
base_filters &= ~filters.forwarded
|
base_filters &= ~filters.forwarded
|
||||||
sudo_filters &= ~filters.forwarded
|
sudo_filters &= ~filters.forwarded
|
||||||
|
@ -23,7 +23,7 @@ async def get_log(token: Optional[str] = Header(...), num: Union[int, str] = 100
|
|||||||
num = 100
|
num = 100
|
||||||
|
|
||||||
async def streaming_logs():
|
async def streaming_logs():
|
||||||
with open("pagermaid.log.txt", "r", encoding="utf-8") as f:
|
with open("data/pagermaid.log.txt", "r", encoding="utf-8") as f:
|
||||||
for log in f.readlines()[-num:]:
|
for log in f.readlines()[-num:]:
|
||||||
yield log
|
yield log
|
||||||
await asyncio.sleep(0.02)
|
await asyncio.sleep(0.02)
|
||||||
|
Loading…
Reference in New Issue
Block a user