From 988618af4f79c982002679193b791cccc1556ff7 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 31 Mar 2003 10:45:41 +0000 Subject: [PATCH] Altered lithp command to handle 'z' and changed a list comprehension with a builtin to a map --- plugins/FunCommands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/FunCommands.py b/plugins/FunCommands.py index 2cec130ed..bad75dfc8 100644 --- a/plugins/FunCommands.py +++ b/plugins/FunCommands.py @@ -244,7 +244,7 @@ class FunCommands(callbacks.Privmsg): arg = privmsgs.getArgs(args) m = re.match(self._dicere, arg) if m: - (dice, sides) = [int(s) for s in m.groups()] + (dice, sides) = map(int, m.groups()) if dice > 6: irc.error(msg, 'You can\'t roll more than 6 dice.') elif sides > 100: @@ -265,7 +265,9 @@ class FunCommands(callbacks.Privmsg): text = text.replace('ss', 'th') text = text.replace('SS', 'th') text = text.replace('s', 'th') + text = text.replace('z', 'th') text = text.replace('S', 'TH') + text = text.replace('Z', 'TH') text = text.replace('x', 'kth') text = text.replace('X', 'KTH') irc.reply(msg, text)