plugin: check handling conditions for simple msgs

This commit is contained in:
dece 2020-11-08 16:07:54 +01:00
parent 937c5ad203
commit 943e62fc31

View file

@ -135,6 +135,10 @@ class Plugin:
num_parts = len(first_word_and_rest)
if num_parts == 0:
return None
# Are the config conditions to answer a question valid?
elif not self.__respects_handling_conditions():
return False
# Is the message addressed to me?
elif first_word_and_rest[0] in self.bot.names:
if num_parts == 1:
return ""