Fix automsc (thanks June)

This commit is contained in:
Nexus 2024-09-18 17:33:12 +01:00
parent ea28f2cebe
commit 07bb4eb010
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ class DNSCommand(niobot.Module):
else:
response, _ = response
lines = [
"Answer for `%s`, using DNS server %r (took %.2fms):" % (hostname, where, (end_ts - start_ts)),
"Answer for `%s`, using DNS server %r (took %.2fms):" % (hostname, where, (end_ts - start_ts) / 1000),
""
]
for n, answer in enumerate(response.answer, start=1):

View file

@ -58,7 +58,7 @@ class MSCGetter(niobot.Module):
if await self.bot.redis.get(
self.bot.redis_key(room.room_id, "auto_msc.enabled")
):
matches = re.finditer("[MmSsCc]\W?([0-9]{1,4})", message.body)
matches = re.finditer("^[MmSsCc]\W?([0-9]{1,4})$", message.body)
lines = []
for m in matches: