mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 07:35:27 +00:00
logs: ok, but add ok words too
This commit is contained in:
parent
7840c16172
commit
e4bfd7daf9
|
@ -17,8 +17,9 @@ class Logs:
|
||||||
self.name_re = re.compile(r"[a-zA-Z0-9].*")
|
self.name_re = re.compile(r"[a-zA-Z0-9].*")
|
||||||
self.clean_re = re.compile(r'[\W_]+', re.UNICODE)
|
self.clean_re = re.compile(r'[\W_]+', re.UNICODE)
|
||||||
# All lower case, no spaces, nothing non-alphanumeric
|
# All lower case, no spaces, nothing non-alphanumeric
|
||||||
self.susp_words = ["sxos", "reinx", "tinfoil", "dz", "goldleaf",
|
self.susp_words = ["sx", "tx", "reinx", "tinfoil", "dz", "goldleaf",
|
||||||
"nsp", "xci"]
|
"nsp", "xci", "nut", "doge", "cdnsp"]
|
||||||
|
self.ok_words = ["nspwn", "hblnsp"]
|
||||||
|
|
||||||
async def on_member_join(self, member):
|
async def on_member_join(self, member):
|
||||||
await self.bot.wait_until_ready()
|
await self.bot.wait_until_ready()
|
||||||
|
@ -89,7 +90,8 @@ class Logs:
|
||||||
alert = True
|
alert = True
|
||||||
|
|
||||||
for susp_word in self.susp_words:
|
for susp_word in self.susp_words:
|
||||||
if susp_word in cleancont:
|
if susp_word in cleancont and\
|
||||||
|
not any(ok_word in cleancont for ok_word in self.ok_words):
|
||||||
msg += f"\n- Contains suspicious word: `{susp_word}`"
|
msg += f"\n- Contains suspicious word: `{susp_word}`"
|
||||||
alert = True
|
alert = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue