diff options
| author | Simeon Simeonov | 2015-04-17 20:56:18 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2015-04-17 20:56:18 +0200 |
| commit | 5d19e4e05f8fcd44e6a596f5e919fb91e45e54b7 (patch) | |
| tree | d588915da3599bc69c02c6ec1a10dccc134ffbc2 | |
| parent | 6661127128907a4147ca0e9fe4b70415dd424ad5 (diff) | |
Better target list output for beinc_weechat.py
| -rw-r--r-- | beinc_weechat.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/beinc_weechat.py b/beinc_weechat.py index b497acb..52e83b6 100644 --- a/beinc_weechat.py +++ b/beinc_weechat.py | |||
| @@ -42,7 +42,7 @@ global_values = dict() | |||
| 42 | BEINC_POLICY_NONE = 0 | 42 | BEINC_POLICY_NONE = 0 |
| 43 | BEINC_POLICY_ALL = 1 | 43 | BEINC_POLICY_ALL = 1 |
| 44 | BEINC_POLICY_LIST_ONLY = 2 | 44 | BEINC_POLICY_LIST_ONLY = 2 |
| 45 | BEINC_CURRENT_CONFIG_VERSION = 1 | 45 | BEINC_CURRENT_CONFIG_VERSION = 2 |
| 46 | 46 | ||
| 47 | BEINC_SSL_METHODS = {'SSLv3': ssl.PROTOCOL_SSLv3, | 47 | BEINC_SSL_METHODS = {'SSLv3': ssl.PROTOCOL_SSLv3, |
| 48 | 'TLSv1': ssl.PROTOCOL_TLSv1} | 48 | 'TLSv1': ssl.PROTOCOL_TLSv1} |
| @@ -227,19 +227,25 @@ class WeechatTarget(object): | |||
| 227 | def __repr__(self): | 227 | def __repr__(self): |
| 228 | """ | 228 | """ |
| 229 | """ | 229 | """ |
| 230 | return ('name: {0}\nurl: {1}\nchannel_list: {2}\nnick_list: {3}\n' | 230 | return ('name: {0}\nurl: {1}\nenabled: {2}\nchannel_list: {3}\n' |
| 231 | 'channel_messages_policy: {4}\nprivate_messages_policy: {5}\n' | 231 | 'nick_list: {4}\nchannel_messages_policy: {5}\n' |
| 232 | 'notifications_policy: {6}\nenabled: {7}\nconnected: {8}\n' | 232 | 'private_messages_policy: {6}\nnotifications_policy: {7}\n' |
| 233 | 'debug: {9}\n\n'.format( | 233 | 'connected: {8}\nsocket timeout: {9}\nssl-version: {10}\n' |
| 234 | 'ciphers: {11}\ndisable_hostname_check: {12}\n' | ||
| 235 | 'debug: {13}\n\n'.format( | ||
| 234 | self.__name, | 236 | self.__name, |
| 235 | self.__url, | 237 | self.__url, |
| 238 | 'yes' if self.__enabled else 'no', | ||
| 236 | ', '.join(self.__chans), | 239 | ', '.join(self.__chans), |
| 237 | ', '.join(self.__nicks), | 240 | ', '.join(self.__nicks), |
| 238 | self.__chan_messages_policy, | 241 | self.__chan_messages_policy, |
| 239 | self.__priv_messages_policy, | 242 | self.__priv_messages_policy, |
| 240 | self.__notifications_policy, | 243 | self.__notifications_policy, |
| 241 | 'yes' if self.__enabled else 'no', | ||
| 242 | 'no' if self.__connection is None else 'yes', | 244 | 'no' if self.__connection is None else 'yes', |
| 245 | self.__socket_timeout, | ||
| 246 | self.__ssl_version, | ||
| 247 | self.__ssl_ciphers or 'default', | ||
| 248 | 'yes' if self.__disable_hostname_check else 'no' | ||
| 243 | 'yes' if self.__debug else 'no')) | 249 | 'yes' if self.__debug else 'no')) |
| 244 | 250 | ||
| 245 | def send_private_message_notification(self, values): | 251 | def send_private_message_notification(self, values): |
