Do not prompt for credentials when they appear in file account.toml.
This commit is contained in:
parent
61c49c678a
commit
9e051fa0a6
4 changed files with 20 additions and 6 deletions
|
@ -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']
|
||||
|
|
|
@ -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 \
|
||||
|
|
6
kaikout/assets/rtbl.toml
Normal file
6
kaikout/assets/rtbl.toml
Normal file
|
@ -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"
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue