aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-29 09:44:13 +0100
committerGravatar jesopo2018-09-29 09:44:13 +0100
commit746155fd57b53717c9584e252040399e4327b024 (patch)
treee6336a0669b53f0d2bbab4d0a804d02225cc353c /modules
parentAdd 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.py4
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)