yubicootp: Limit to one OTP per message
This commit is contained in:
parent
8d1ef828f0
commit
490916a1ca
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ class YubicoOTP(Cog):
|
||||||
async def on_message(self, message):
|
async def on_message(self, message):
|
||||||
await self.bot.wait_until_ready()
|
await self.bot.wait_until_ready()
|
||||||
otps = self.otp_re.findall(message.content.strip())
|
otps = self.otp_re.findall(message.content.strip())
|
||||||
for otp_entry in otps:
|
if otps:
|
||||||
otp = otp_entry[0]
|
otp = otps[0][0]
|
||||||
# Validate OTP
|
# Validate OTP
|
||||||
validation_result = await self.validate_yubico_otp(otp)
|
validation_result = await self.validate_yubico_otp(otp)
|
||||||
if validation_result is not True:
|
if validation_result is not True:
|
||||||
|
|
Loading…
Reference in a new issue