From 5eeffc30ef7135361b1c31c34174e89d6cc72bf6 Mon Sep 17 00:00:00 2001 From: Anton McClure Date: Wed, 5 Jun 2019 10:37:58 -0400 Subject: Replaced command ,bang with ,trap --- modules/ducks.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/ducks.py b/modules/ducks.py index ce4af8ca..5bdab6cf 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -68,7 +68,7 @@ class Module(ModuleManager.BaseModule): return "%s %s a duck! You've %s %d ducks in %s!" % ( user.nickname, action, action, action_count, channel.name) - def _no_duck(self, channel, user, stderr, action): + def _no_duck(self, channel, user, stderr): if channel.get_setting("ducks-kick"): channel.send_kick(user.nickname, NO_DUCK) else: @@ -82,18 +82,16 @@ class Module(ModuleManager.BaseModule): "ducks-befriended") event["stdout"].write(action) else: - self._no_duck(event["target"], event["user"], event["stderr"], - "befriend") + self._no_duck(event["target"], event["user"], event["stderr"]) - @utils.hook("received.command.bang", channel_only=True) - def bang(self, event): + @utils.hook("received.command.trap", channel_only=True) + def trap(self, event): if event["target"].duck_active: - action = self._duck_action(event["target"], event["user"], "shot", + action = self._duck_action(event["target"], event["user"], "trapped", "ducks-shot") event["stdout"].write(action) else: - self._no_duck(event["target"], event["user"], event["stderr"], - "shoot") + self._no_duck(event["target"], event["user"], event["stderr"]) @utils.hook("received.command.friends") def friends(self, event): -- cgit v1.3.1-10-gc9f91