]> kaliko git repositories - sid.git/blobdiff - sid/rtbl.py
doc: Improve and update
[sid.git] / sid / rtbl.py
index 424a17982f0ea8e665969dd8c9e6560eb5e61bc9..1539b28a1273be86420c38b9df6d99c4dfc0f8c9 100644 (file)
@@ -1,7 +1,17 @@
 # -*- coding: utf-8 -*-
 # SPDX-FileCopyrightText: 2023 kaliko <kaliko@azylum.org>
 # SPDX-License-Identifier: GPL-3.0-or-later
-"""A Real Time Block List plugin"""
+"""A Real Time Block List plugin, cf https://xmppbl.org.
+
+>>> from sid.rtbl import RTBL, BL
+>>> RTBL.pubsub_server = 'xmppbl.org'
+>>> # Optional: Node to subcribe, defaults to 'muc_bans_sha256'
+>>> RTBL.node = 'muc_bans_sha256'
+>>> # Optional: Add this JID hash to the list, default is empty, usefull for test
+>>> BL.init = {'1312b8ca593cd074f39ef15cc8442cdf426b21480958836d9ab678ca45ed1312': 'Test!'}
+>>> # Optional: Set plugin log level, default inherit from the bot
+>>> RTBL.log_level = logging.DEBUG
+"""
 
 from hashlib import sha256
 from typing import Dict, Optional