diff options
| author | 2019-12-10 05:27:35 +0000 | |
|---|---|---|
| committer | 2019-12-10 05:27:35 +0000 | |
| commit | 638eee0d685c06d258cb55287204ca97bca7c344 (patch) | |
| tree | 33442439317ae2846f1efb7674b7a3758c8990a1 /modules/more.py | |
| parent | move sys.exit() codes to an enum in utils.consts (diff) | |
move core modules to src/core_modules, make them uneffected by white/black list
Diffstat (limited to 'modules/more.py')
| -rw-r--r-- | modules/more.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/modules/more.py b/modules/more.py deleted file mode 100644 index 52849938..00000000 --- a/modules/more.py +++ /dev/null @@ -1,23 +0,0 @@ -from src import EventManager, ModuleManager, utils - -class Module(ModuleManager.BaseModule): - @utils.hook("new.user") - @utils.hook("new.channel") - def new(self, event): - obj = event.get("user", event.get("channel", None)) - obj._last_stdout = None - obj._last_stderr = None - - @utils.hook("postprocess.command") - @utils.kwarg("priority", EventManager.PRIORITY_MONITOR) - def postprocess(self, event): - if event["stdout"].has_text(): - event["target"]._last_stdout = event["stdout"] - if event["stderr"].has_text(): - event["target"]._last_stderr = event["stderr"] - - @utils.hook("received.command.more") - def more(self, event): - last_stdout = event["target"]._last_stdout - if last_stdout and last_stdout.has_text(): - event["stdout"].write_lines(last_stdout.get_all()) |
