diff --git a/edmond/plugins/ambience.py b/edmond/plugins/ambience.py index cafceda..3dec67b 100644 --- a/edmond/plugins/ambience.py +++ b/edmond/plugins/ambience.py @@ -44,16 +44,11 @@ class AmbiencePlugin(Plugin): def get_reply(self, event, target=None): reply = "" num_chunks = random.randint(2, 3) - if target is not None or proc(self.config["effect_rate"]): - effect_index = random.randint(0, num_chunks - 1) - effect_word = (target or event.source.nick).upper() - else: - effect_index = -1 for i in range(num_chunks): - chunk = self.get_chunk() - if i == effect_index: - chunk = self.apply_effect(chunk, effect_word) - reply += chunk + reply += self.get_chunk() + if target is not None or proc(self.config["effect_rate"]): + effect_word = (target or event.source.nick).upper() + reply = self.apply_effect(reply, effect_word) return reply def get_chunk(self):