aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar dngfx2018-09-09 03:39:29 +0100
committerGravatar dongfix2018-09-09 03:39:29 +0100
commitc8bbdddc595595336c64bd9a2f8db40e3b851f84 (patch)
tree9ed601ca0659e3a24a6c5e66edb20f36a5e7c74e /modules
parentString formatting exists and it is a wonderful thing. (diff)
signature
FONT_RESET should be FONT_COLOR, also more string wizardry in ducks.py!
Diffstat (limited to 'modules')
-rw-r--r--modules/commands.py4
-rw-r--r--modules/ducks.py12
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)