diff options
| author | 2018-09-29 09:44:13 +0100 | |
|---|---|---|
| committer | 2018-09-29 09:44:13 +0100 | |
| commit | 746155fd57b53717c9584e252040399e4327b024 (patch) | |
| tree | e6336a0669b53f0d2bbab4d0a804d02225cc353c /modules | |
| parent | Add IRCBot.directory, in case we need it. (diff) | |
| signature | ||
Support command hooks not coming from a class instance
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/commands.py b/modules/commands.py index c60876c3..d98a7e23 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -92,7 +92,9 @@ class Module(ModuleManager.BaseModule): buffer = target.buffer - module_name = hook.function.__self__._name + module_name = "" + if hasattr(hook.function, "__self__"): + module_name = hook.function.__self__._name stdout, stderr = StdOut(module_name, target), StdErr(module_name, target) |
