blob: 087f6413c7a4b108055b4d5f357eda7d17c07e32 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#--depends-on commands
from src import ModuleManager, utils
class Module(ModuleManager.BaseModule):
@utils.hook("received.command.echo")
@utils.kwarg("min_args", 1)
def echo(self, event):
event["stdout"].write(event["args"])
@utils.hook("received.command.action")
@utils.kwarg("min_args", 1)
@utils.kwarg("expect_output", False)
def action(self, event):
event["target"].send_message("\x01ACTION %s\x01" % event["args"])
|