aboutsummaryrefslogtreecommitdiffstats
path: root/slack/main.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2022-10-24 22:29:03 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:52 +0100
commit4b004a356aec12eb59fb4c5a208c21d3817ef9d7 (patch)
tree41ab637631d19f890afae937e42f03e8a339c1cd /slack/main.py
parentee9d976ff8d8910c091d1554dfa62ab28ad67509 (diff)
downloadwee-slack-4b004a356aec12eb59fb4c5a208c21d3817ef9d7.tar.gz
Add callbacks to global scope
Diffstat (limited to 'slack/main.py')
-rw-r--r--slack/main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/slack/main.py b/slack/main.py
index 32dc3d5..5ab431c 100644
--- a/slack/main.py
+++ b/slack/main.py
@@ -9,6 +9,9 @@ sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import globals as G # pylint: disable=wrong-import-position
from config import SlackConfig, SlackWorkspace # pylint: disable=wrong-import-position
from task import create_task # pylint: disable=wrong-import-position
+from util import get_callback_name # pylint: disable=wrong-import-position
+
+G.weechat_callbacks = globals()
def shutdown_cb():
@@ -39,7 +42,7 @@ if __name__ == "__main__":
G.SCRIPT_VERSION,
G.SCRIPT_LICENSE,
G.SCRIPT_DESC,
- shutdown_cb.__name__,
+ get_callback_name(shutdown_cb),
"",
):
G.weechat_version = int(weechat.info_get("version_number", "") or 0)