diff options
Diffstat (limited to 'beinc_weechat.py')
| -rw-r--r-- | beinc_weechat.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/beinc_weechat.py b/beinc_weechat.py index 8462b76..b0a7cdc 100644 --- a/beinc_weechat.py +++ b/beinc_weechat.py | |||
| @@ -194,7 +194,7 @@ class WeechatTarget(object): | |||
| 194 | 'message': message_str, | 194 | 'message': message_str, |
| 195 | 'password': self.__password} | 195 | 'password': self.__password} |
| 196 | data = urllib.urlencode(post_values) | 196 | data = urllib.urlencode(post_values) |
| 197 | if self.__send_beinc_message(data) and self.__debug: | 197 | if not self.__send_beinc_message(data) and self.__debug: |
| 198 | beinc_prnt( | 198 | beinc_prnt( |
| 199 | 'BEINC DEBUG: send_private_message_notification-ERROR ' | 199 | 'BEINC DEBUG: send_private_message_notification-ERROR ' |
| 200 | 'for "{0}": __send_beinc_message -> False'.format( | 200 | 'for "{0}": __send_beinc_message -> False'.format( |
| @@ -218,7 +218,7 @@ class WeechatTarget(object): | |||
| 218 | 'message': message_str, | 218 | 'message': message_str, |
| 219 | 'password': self.__password} | 219 | 'password': self.__password} |
| 220 | data = urllib.urlencode(post_values) | 220 | data = urllib.urlencode(post_values) |
| 221 | if self.__send_beinc_message(data) and self.__debug: | 221 | if not self.__send_beinc_message(data) and self.__debug: |
| 222 | beinc_prnt( | 222 | beinc_prnt( |
| 223 | 'BEINC DEBUG: send_channel_message_notification-ERROR ' | 223 | 'BEINC DEBUG: send_channel_message_notification-ERROR ' |
| 224 | 'for "{0}": __send_beinc_message -> False'.format( | 224 | 'for "{0}": __send_beinc_message -> False'.format( |
| @@ -242,7 +242,7 @@ class WeechatTarget(object): | |||
| 242 | 'message': message_str, | 242 | 'message': message_str, |
| 243 | 'password': self.__password} | 243 | 'password': self.__password} |
| 244 | data = urllib.urlencode(post_values) | 244 | data = urllib.urlencode(post_values) |
| 245 | if self.__send_beinc_message(data) and self.__debug: | 245 | if not self.__send_beinc_message(data) and self.__debug: |
| 246 | beinc_prnt( | 246 | beinc_prnt( |
| 247 | 'BEINC DEBUG: send_notify_message_notification-ERROR ' | 247 | 'BEINC DEBUG: send_notify_message_notification-ERROR ' |
| 248 | 'for "{0}": __send_beinc_message -> False'.format( | 248 | 'for "{0}": __send_beinc_message -> False'.format( |
| @@ -387,7 +387,7 @@ def beinc_privmsg_handler(data, signal, signal_data): | |||
| 387 | if not global_values['global_private_messages_policy']: | 387 | if not global_values['global_private_messages_policy']: |
| 388 | return weechat.WEECHAT_RC_OK | 388 | return weechat.WEECHAT_RC_OK |
| 389 | p_messages_policy = global_values['global_private_messages_policy'] | 389 | p_messages_policy = global_values['global_private_messages_policy'] |
| 390 | if p_messages_policy == BEINC_POLICY_LIST_ONLY and | 390 | if p_messages_policy == BEINC_POLICY_LIST_ONLY and \ |
| 391 | '{0}.{1}'.format( | 391 | '{0}.{1}'.format( |
| 392 | ph_values['server'], | 392 | ph_values['server'], |
| 393 | ph_values['source_nick'].lower() | 393 | ph_values['source_nick'].lower() |
| @@ -396,9 +396,9 @@ def beinc_privmsg_handler(data, signal, signal_data): | |||
| 396 | for target in target_list: | 396 | for target in target_list: |
| 397 | if not target.enabled: | 397 | if not target.enabled: |
| 398 | continue | 398 | continue |
| 399 | if target.private_messages_policy == BEINC_POLICY_ALL or | 399 | if target.private_messages_policy == BEINC_POLICY_ALL or \ |
| 400 | ( | 400 | ( |
| 401 | target.private_messages_policy == BEINC_POLICY_LIST_ONLY and | 401 | target.private_messages_policy == BEINC_POLICY_LIST_ONLY and \ |
| 402 | '{0}.{1}'.format( | 402 | '{0}.{1}'.format( |
| 403 | ph_values['server'], | 403 | ph_values['server'], |
| 404 | ph_values['source_nick'].lower()) in target.nicks | 404 | ph_values['source_nick'].lower()) in target.nicks |
| @@ -409,7 +409,7 @@ def beinc_privmsg_handler(data, signal, signal_data): | |||
| 409 | if not global_values['global_notifications_policy']: | 409 | if not global_values['global_notifications_policy']: |
| 410 | return weechat.WEECHAT_RC_OK | 410 | return weechat.WEECHAT_RC_OK |
| 411 | notifications_policy = global_values['global_notifications_policy'] | 411 | notifications_policy = global_values['global_notifications_policy'] |
| 412 | if notifications_policy == BEINC_POLICY_LIST_ONLY and | 412 | if notifications_policy == BEINC_POLICY_LIST_ONLY and \ |
| 413 | ( | 413 | ( |
| 414 | '{0}.{1}'.format( | 414 | '{0}.{1}'.format( |
| 415 | ph_values['server'], | 415 | ph_values['server'], |
| @@ -432,7 +432,7 @@ def beinc_privmsg_handler(data, signal, signal_data): | |||
| 432 | if not global_values['global_notifications_policy']: | 432 | if not global_values['global_notifications_policy']: |
| 433 | return weechat.WEECHAT_RC_OK | 433 | return weechat.WEECHAT_RC_OK |
| 434 | c_messages_policy = global_values['global_channel_messages_policy'] | 434 | c_messages_policy = global_values['global_channel_messages_policy'] |
| 435 | if c_messages_policy == BEINC_POLICY_LIST_ONLY and | 435 | if c_messages_policy == BEINC_POLICY_LIST_ONLY and \ |
| 436 | ( | 436 | ( |
| 437 | '{0}.{1}'.format( | 437 | '{0}.{1}'.format( |
| 438 | ph_values['server'], | 438 | ph_values['server'], |
| @@ -443,9 +443,9 @@ def beinc_privmsg_handler(data, signal, signal_data): | |||
| 443 | for target in target_list: | 443 | for target in target_list: |
| 444 | if not target.enabled: | 444 | if not target.enabled: |
| 445 | continue | 445 | continue |
| 446 | if target.channel_messages_policy == BEINC_POLICY_ALL or | 446 | if target.channel_messages_policy == BEINC_POLICY_ALL or \ |
| 447 | ( | 447 | ( |
| 448 | target.channel_messages_policy == BEINC_POLICY_LIST_ONLY and | 448 | target.channel_messages_policy == BEINC_POLICY_LIST_ONLY and \ |
| 449 | '{0}.{1}'.format( | 449 | '{0}.{1}'.format( |
| 450 | ph_values['server'], | 450 | ph_values['server'], |
| 451 | ph_values['channel'].lower()) in target.chans | 451 | ph_values['channel'].lower()) in target.chans |
