aboutsummaryrefslogtreecommitdiffstats
path: root/slack
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-15 01:44:40 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit9ad8757ab557995a049736ca784b770ce95e377b (patch)
treeb59d615093b10d9b65c9f08dbbbb9e9cd4d5f21a /slack
parent02cf9e43839ee1747c07e1f2c8c7b6ecc24518cc (diff)
downloadwee-slack-9ad8757ab557995a049736ca784b770ce95e377b.tar.gz
Rename init
Diffstat (limited to 'slack')
-rw-r--r--slack/register.py (renamed from slack/init.py)6
1 files changed, 3 insertions, 3 deletions
diff --git a/slack/init.py b/slack/register.py
index dd3c080..924e0eb 100644
--- a/slack/init.py
+++ b/slack/register.py
@@ -69,7 +69,7 @@ def ws_ping_cb(data: str, remaining_calls: int) -> int:
return weechat.WEECHAT_RC_OK
-async def init():
+async def init_async():
auto_connect = weechat.info_get("auto_connect", "") == "1"
if auto_connect:
await sleep(1) # Defer auto connect to ensure the logger plugin is loaded
@@ -78,7 +78,7 @@ async def init():
await workspace.connect()
-def main():
+def register():
if weechat.register(
shared.SCRIPT_NAME,
SCRIPT_AUTHOR,
@@ -107,4 +107,4 @@ def main():
)
weechat.hook_timer(5000, 0, 0, get_callback_name(ws_ping_cb), "")
- create_task(init())
+ create_task(init_async())