X-Git-Url: http://git.kaliko.me/?p=sid.git;a=blobdiff_plain;f=sid%2Frtbl.py;fp=sid%2Frtbl.py;h=1539b28a1273be86420c38b9df6d99c4dfc0f8c9;hp=424a17982f0ea8e665969dd8c9e6560eb5e61bc9;hb=b32d7a8cb7b1bd5cd16e461d14ed94891b93014f;hpb=1aea0b1d518984cc82c616c584a4fa7d20b81ec5 diff --git a/sid/rtbl.py b/sid/rtbl.py index 424a179..1539b28 100644 --- a/sid/rtbl.py +++ b/sid/rtbl.py @@ -1,7 +1,17 @@ # -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2023 kaliko # 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