diff --git a/kaikout/__main__.py b/kaikout/__main__.py index a49e69b..9534e5e 100644 --- a/kaikout/__main__.py +++ b/kaikout/__main__.py @@ -40,13 +40,13 @@ def main(): logging.basicConfig(level=args.loglevel, format='%(levelname)-8s %(message)s') - if args.jid is None: - args.jid = input("Username: ") - if args.password is None: - args.password = getpass("Password: ") - account_xmpp = Config.get_values('accounts.toml', 'xmpp') + if args.jid is None and not account_xmpp['client']['jid']: + args.jid = input("Username: ") + if args.password is None and not account_xmpp['client']['password']: + args.password = getpass("Password: ") + # Try configuration file if 'client' in account_xmpp: jid = account_xmpp['client']['jid'] diff --git a/kaikout/assets/about.toml b/kaikout/assets/about.toml index 52808ef..1701072 100644 --- a/kaikout/assets/about.toml +++ b/kaikout/assets/about.toml @@ -96,7 +96,7 @@ fits best to you. [[friends]] name = "sid an xmpp bot" info = [""" -The ultimate XMPP bot! Some of its features include +A moderation, syndication and issue tracker bot. RTBL Real Time Block List which would download a hash list of blacklisted JIDs, and \ diff --git a/kaikout/assets/rtbl.toml b/kaikout/assets/rtbl.toml new file mode 100644 index 0000000..1e683be --- /dev/null +++ b/kaikout/assets/rtbl.toml @@ -0,0 +1,6 @@ +# This file lists default RTBL sources per database. +# See file /usr/share/kaikout/rtbl.toml + +[[node]] +jabber_id = "xmppbl.org" +node_name = "muc_bans_sha256" diff --git a/kaikout/xmpp/client.py b/kaikout/xmpp/client.py index 6b5bbac..7ef1a0e 100644 --- a/kaikout/xmpp/client.py +++ b/kaikout/xmpp/client.py @@ -477,6 +477,14 @@ class XmppClient(slixmpp.ClientXMPP): """ # self.command_list() # await self.get_roster() + subscriptions_of_node = await self['xep_0060'].get_node_subscriptions("xmppbl.org", "muc_bans_sha256") + print() + print('=== subscriptions_of_node ===') + print() + print(subscriptions_of_node) + print() + print('=== subscriptions_of_node ===') + print() await self['xep_0115'].update_caps() bookmarks = await XmppBookmark.get_bookmarks(self) print(bookmarks)