From c8bbdddc595595336c64bd9a2f8db40e3b851f84 Mon Sep 17 00:00:00 2001 From: dngfx <294904+dngfx@users.noreply.github.com> Date: Sun, 9 Sep 2018 03:39:29 +0100 Subject: [PATCH] FONT_RESET should be FONT_COLOR, also more string wizardry in ducks.py! --- modules/commands.py | 4 ++-- modules/ducks.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/commands.py b/modules/commands.py index fcd12847..d6b821f0 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -38,11 +38,11 @@ class Out(object): class StdOut(Out): def prefix(self): return "%s%s%s" % (Utils.color(Utils.COLOR_GREEN), - self.module_name, Utils.FONT_RESET) + self.module_name, Utils.FONT_COLOR) class StdErr(Out): def prefix(self): return "%s!%s%s" % (Utils.color(Utils.COLOR_RED), - self.module_name, Utils.FONT_RESET) + self.module_name, Utils.FONT_COLOR) class Module(object): def __init__(self, bot, events, exports): diff --git a/modules/ducks.py b/modules/ducks.py index 255e9cf4..1d528247 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -315,8 +315,10 @@ class Module(object): length = len(enemy_nicks) if len(enemy_nicks) < 8 else 8 for i in range(0, length): - build.append("%s (%s)" % (Utils.bold(enemy_nicks[i]), - enemy_ducks[i])) + nick = Utils.prevent_highlight(enemy_nicks[i]) + build.append("%s (%s)" \ + % (Utils.bold(nick), + enemy_ducks[i])) sentence += ", ".join(build) @@ -347,8 +349,10 @@ class Module(object): build = [] for i in range(0, length): - build.append("%s (%s)" % ( Utils.bold(friend_nicks[i]), - friend_ducks[i]) + nick = Utils.prevent_highlight(friend_nicks[i]) + build.append("%s (%s)" \ + % ( Utils.bold(nick), + friend_ducks[i]) ) sentence += ", ".join(build)