X-Git-Url: https://git.kaliko.me/?p=sid.git;a=blobdiff_plain;f=sid%2Frtbl.py;fp=sid%2Frtbl.py;h=13e5c91332fcb485afea779cd092f4457a1dc783;hp=44f5ca4bb0d11b26519df43f7a924204edd5c406;hb=cf4e0e61fd723ec820449c6dd26a820514404c63;hpb=fcad55c852f786c27988697f52b1dca2d05d3626 diff --git a/sid/rtbl.py b/sid/rtbl.py index 44f5ca4..13e5c91 100644 --- a/sid/rtbl.py +++ b/sid/rtbl.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: 2014, 2020, 2023 kaliko -# SPDX-FileCopyrightText: 2007-2012 Thomas Perl +# SPDX-FileCopyrightText: 2023 kaliko # SPDX-License-Identifier: GPL-3.0-or-later """A Real Time Block List plugin""" @@ -20,7 +19,8 @@ def jid_to_sha256(jid: JID) -> str: class BL: - """Plain object to keep track of block list items""" + """Plain object to keep track of block list items. + Only used in RTBL plugin.""" def __init__(self, initial_bl): self.sha256_jids: Dict[str, Optional[str]] = {} @@ -59,9 +59,11 @@ class BL: class RTBL(Plugin): - """Spam guard for MUC + """Spam guard plugin for MUC. """ + #: Pubsub server pubsub_server = 'example.org' + #: Pubsub server node to subscribe to node = 'muc_bans_sha256' def __init__(self, bot): @@ -154,7 +156,7 @@ class RTBL(Plugin): await self.ban(jid.bare, reason=reason) def got_offline(self, pres): - """Handler method for laving MUC participants""" + """Handler method for leaving MUC participants""" fjid = pres['muc']['jid'] user = fjid if fjid.full else pres['muc']['nick'] try: