FONT_RESET should be FONT_COLOR, also more string wizardry in ducks.py!

This commit is contained in:
dngfx 2018-09-09 03:39:29 +01:00 committed by dongfix
parent fb3fa55477
commit c8bbdddc59
2 changed files with 10 additions and 6 deletions

View file

@ -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):

View file

@ -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)