aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar Anton McClure2019-06-05 10:37:58 -0400
committerGravatar Anton McClure2019-06-05 10:37:58 -0400
commit5eeffc30ef7135361b1c31c34174e89d6cc72bf6 (patch)
tree70ac3e440dd0142318cddb5c9a14f7a757398d3f /modules
parentUpdate CHANGELOG (diff)
Replaced command ,bang with ,trap
Diffstat (limited to 'modules')
-rw-r--r--modules/ducks.py14
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):