From d6c8ae845bca32f50dd6f8bc7c6170ac777efed1 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sun, 2 Jun 2019 20:22:24 -0400 Subject: [PATCH] test --- sopel_modules/SpiceBot/AI.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sopel_modules/SpiceBot/AI.py b/sopel_modules/SpiceBot/AI.py index 3fdd237..b7377d8 100644 --- a/sopel_modules/SpiceBot/AI.py +++ b/sopel_modules/SpiceBot/AI.py @@ -98,19 +98,14 @@ class SpiceBot_AI(): return aiml_response def bot_message_precipher(self, bot, trigger, message): - while str(bot.nick) in message.upper(): - message = message.replace(str(bot.nick), "bot.nick") - while str(trigger.nick) in message.upper(): - message = message.replace(str(trigger.nick), "trigger.nick") + message = message.replace(str(bot.nick), "bot.nick") + message = message.replace(str(trigger.nick), "trigger.nick") bot.say(str(message)) return message def bot_message_decipher(self, bot, trigger, aiml_response): - while "bot.nick" in aiml_response: - aiml_response = aiml_response.replace("bot.nick", str(bot.nick)) - while "trigger.nick" in aiml_response: - aiml_response = aiml_response.replace("trigger.nick", str(trigger.nick)) - bot.say(str(aiml_response)) + aiml_response = aiml_response.replace("bot.nick", str(bot.nick)) + aiml_response = aiml_response.replace("trigger.nick", str(trigger.nick)) return aiml_response def check_user_import(self, nick, nick_id=None):