diff options
| author | 2019-06-05 16:12:45 +0100 | |
|---|---|---|
| committer | 2019-06-05 16:12:45 +0100 | |
| commit | 7e5f6af344e70117bf9f12aa8d6cabbb8fb2379f (patch) | |
| tree | 70ac3e440dd0142318cddb5c9a14f7a757398d3f /modules/ducks.py | |
| parent | Update CHANGELOG (diff) | |
| parent | Replaced command ,bang with ,trap (diff) | |
Merge pull request #62 from AntonMcClure/master
Replaced command ,bang with ,trap
Diffstat (limited to 'modules/ducks.py')
| -rw-r--r-- | modules/ducks.py | 14 |
1 files changed, 6 insertions, 8 deletions
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): |
