Replaced command ,bang with ,trap
This commit is contained in:
parent
f8c8074c7e
commit
5eeffc30ef
1 changed files with 6 additions and 8 deletions
|
@ -68,7 +68,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
return "%s %s a duck! You've %s %d ducks in %s!" % (
|
return "%s %s a duck! You've %s %d ducks in %s!" % (
|
||||||
user.nickname, action, action, action_count, channel.name)
|
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"):
|
if channel.get_setting("ducks-kick"):
|
||||||
channel.send_kick(user.nickname, NO_DUCK)
|
channel.send_kick(user.nickname, NO_DUCK)
|
||||||
else:
|
else:
|
||||||
|
@ -82,18 +82,16 @@ class Module(ModuleManager.BaseModule):
|
||||||
"ducks-befriended")
|
"ducks-befriended")
|
||||||
event["stdout"].write(action)
|
event["stdout"].write(action)
|
||||||
else:
|
else:
|
||||||
self._no_duck(event["target"], event["user"], event["stderr"],
|
self._no_duck(event["target"], event["user"], event["stderr"])
|
||||||
"befriend")
|
|
||||||
|
|
||||||
@utils.hook("received.command.bang", channel_only=True)
|
@utils.hook("received.command.trap", channel_only=True)
|
||||||
def bang(self, event):
|
def trap(self, event):
|
||||||
if event["target"].duck_active:
|
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")
|
"ducks-shot")
|
||||||
event["stdout"].write(action)
|
event["stdout"].write(action)
|
||||||
else:
|
else:
|
||||||
self._no_duck(event["target"], event["user"], event["stderr"],
|
self._no_duck(event["target"], event["user"], event["stderr"])
|
||||||
"shoot")
|
|
||||||
|
|
||||||
@utils.hook("received.command.friends")
|
@utils.hook("received.command.friends")
|
||||||
def friends(self, event):
|
def friends(self, event):
|
||||||
|
|
Loading…
Reference in a new issue