From f336cecb069a3c92ac953b7ef315b0c15da6514f Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 12 Jun 2019 22:36:26 +0100 Subject: [PATCH] "duck" when duck count is 1, "ducks" otherwise --- modules/ducks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ducks.py b/modules/ducks.py index 158c6f23..b211e5b3 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -68,8 +68,11 @@ class Module(ModuleManager.BaseModule): seconds = round(time.time()-duck_timestamp, 2) - return "%s %s a duck in %s seconds! You've %s %d ducks in %s!" % ( - user.nickname, action, seconds, action, action_count, channel.name) + ducks_plural = "duck" if action_acount == 1 else "ducks" + + return "%s %s a duck in %s seconds! You've %s %d %s in %s!" % ( + user.nickname, action, seconds, action, action_count, ducks_plural, + channel.name) def _no_duck(self, channel, user, stderr): if channel.get_setting("ducks-kick"):