Commit 3b5ea1a9 authored by mathieui's avatar mathieui

Fix #3322 (send a beep when we get disconnected)

parent 156cfb55
......@@ -355,7 +355,7 @@ use_bookmarks_method =
# someone from a chatroiom)
# - message (any message from a chatroom)
# - invite (when you receive an invitation for joining a chatroom)
#beep_on = highlight private invite
#beep_on = highlight private invite disconnect
# Theme
......
......@@ -820,7 +820,7 @@ Options that change the behavior of poezio in a non-visual manner.
beep_on
**Default value:** ``highlight private``
**Default value:** ``highlight private invite disconnect``
The terminal can beep on various event. Put the event you want in a list
(separated by spaces).
......
......@@ -32,7 +32,7 @@ DEFAULT_CONFIG = {
'auto_reconnect': True,
'autorejoin_delay': '5',
'autorejoin': False,
'beep_on': 'highlight private invite',
'beep_on': 'highlight private invite disconnect',
'ca_cert_path': '',
'certificate': '',
'certfile': '',
......
......@@ -1033,6 +1033,8 @@ class HandlerCore:
"""
When we are disconnected from remote server
"""
if 'disconnect' in config.get('beep_on').split():
curses.beep()
roster.connected = 0
# Stop the ping plugin. It would try to send stanza on regular basis
self.core.xmpp.plugin['xep_0199'].disable_keepalive()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment