Skip to content

Commit

Permalink
irc options, only prompt when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrct committed Aug 2, 2017
1 parent d6a7355 commit ba972a1
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/irc/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ def configure(self):
self.optionString('hostname', prompt='Server hostname', default='irc.freenode.net')
self.optionInt('port', prompt='Server port', default=6697)
self.optionString('channel', prompt='Channel to join')

self.optionBoolean('tls', prompt='Enable TLS', default=True)
self.optionBoolean('tls-verify', prompt='Verify server TLS certificate', default=False)
self.optionString('tls-certificate-file', prompt='TLS certificate file')
self.optionString('tls-certificate-keyfile', prompt='TLS certificate keyfile')
self.optionString('tls-certificate-file', prompt='TLS certificate password')
if self.options['tls']:
self.optionBoolean('tls-verify', prompt='Verify server TLS certificate', default=False)
if self.options['tls-verify']:
self.optionString('tls-certificate-file', prompt='TLS certificate file')
self.optionString('tls-certificate-keyfile', prompt='TLS certificate keyfile')
self.optionString('tls-certificate-file', prompt='TLS certificate password')

self.optionString('sasl-username', prompt='SASL username')
self.optionString('sasl-password', prompt='SASL password')
self.optionString('sasl-identity', prompt='SASL identity')
if 'sasl-username' in self.options:
self.optionString('sasl-password', prompt='SASL password')
self.optionString('sasl-identity', prompt='SASL identity')

# Handle to the Pydle IRC Client object as defined below
client = None
Expand Down

0 comments on commit ba972a1

Please sign in to comment.