1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

add \u200b to (%d) dice() output to avoid smiley detection

This commit is contained in:
urlbot
2015-02-24 16:51:43 +01:00
parent 5b52be57f3
commit f8b28e5a12

View File

@@ -271,7 +271,9 @@ def command_dice(argv, **args):
rnd = random.randint(1, 6)
logger('plugin', 'sent random')
msg += ' %s (%d)' % (dice_char[rnd], rnd)
# the \u200b chars ('ZERO WIDTH SPACE') avoid interpreting stuff as smileys
# by some strange clients
msg += ' %s (\u200b%d\u200b)' % (dice_char[rnd], rnd)
return {
'msg': msg