Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Aug 21, 2024
1 parent 854cd8f commit c02dae0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/core/su_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from database import BotDBUtil


target_list = ["Discord|Channel", "Discord|DM|Channel", "KOOK|Group",
target_list = ["Discord|Channel", "Discord|DM|Channel", "KOOK|Group", "KOOK|Person",
"Matrix|Room", "QQ|Group", "QQ|Guild", "QQ|Private", "Telegram|Channel",
"Telegram|Group", "Telegram|Private", "Telegram|Supergroup", "TEST|Console",]
sender_list = ["Discord|Client", "KOOK|User", "Matrix", "QQ", "QQ|Tiny", "Telegram|User", "TEST",]
Expand Down
4 changes: 2 additions & 2 deletions modules/github/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from core.builtins import Bot, Image, Plain, Url
from core.dirty_check import rickroll
from core.utils.http import download, get_url
from modules.github.utils import time_diff, dirty_check, darkCheck
from modules.github.utils import time_diff, dirty_check, dark_check


async def repo(msg: Bot.MessageSession, name: str):
Expand Down Expand Up @@ -48,7 +48,7 @@ async def repo(msg: Bot.MessageSession, name: str):
if parent:
message += '\n' + parent

is_dirty = await dirty_check(message, result['owner']['login']) or darkCheck(message)
is_dirty = await dirty_check(message, result['owner']['login']) or dark_check(message)
if is_dirty:
await msg.finish(rickroll(msg))
else:
Expand Down
4 changes: 2 additions & 2 deletions modules/github/user.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from core.builtins import Url, Bot
from core.dirty_check import rickroll
from core.utils.http import get_url
from modules.github.utils import time_diff, dirty_check, darkCheck
from modules.github.utils import time_diff, dirty_check, dark_check


async def user(msg: Bot.MessageSession, name: str):
Expand Down Expand Up @@ -33,7 +33,7 @@ async def user(msg: Bot.MessageSession, name: str):
Account Created {time_diff(result['created_at'])} ago | Latest activity {time_diff(result['updated_at'])} ago
{str(Url(result['html_url']))}'''

is_dirty = await dirty_check(message, result['login']) or darkCheck(message)
is_dirty = await dirty_check(message, result['login']) or dark_check(message)
if is_dirty:
await msg.finish(rickroll(msg))

Expand Down
6 changes: 3 additions & 3 deletions modules/github/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import datetime

from config import Config
from core import dirty_check as dirty
from core.builtins import EnableDirtyWordCheck


def darkCheck(message: str):
def dark_check(message: str):
blacklist = [
'china-dictatorship'
'cirosantilli',
Expand All @@ -19,7 +19,7 @@ def darkCheck(message: str):
'zhao',
'programthink'
]
if Config('enable_dirty_check', False):
if EnableDirtyWordCheck:
for i in blacklist:
if message.find(i) != -1:
return True
Expand Down
2 changes: 1 addition & 1 deletion modules/wiki/audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from modules.wiki.utils.dbutils import Audit
from modules.wiki.utils.wikilib import WikiLib

audit_available_list = ["KOOK|Group", "QQ|Group", "QQ|Guild", "QQ|Private"]
audit_available_list = ["KOOK|Group", "KOOK|Person", "QQ|Group", "QQ|Guild", "QQ|Private",]


if Config('enable_urlmanager', False):
Expand Down

0 comments on commit c02dae0

Please sign in to comment.