Commit 0ee4bb61 authored by ge0rg's avatar ge0rg Committed by Link Mauve

self-ping: rename option from 'delay' to 'interval'

parent 0fca4024
......@@ -103,7 +103,7 @@ DEFAULT_CONFIG = {
'roster_show_offline': False,
'roster_sort': 'jid:show',
'save_status': True,
'self_ping_delay': 0,
'self_ping_interval': 0,
'send_chat_states': True,
'send_initial_presence': True,
'send_os_info': True,
......
......@@ -1076,11 +1076,13 @@ class MucTab(ChatTab):
def enable_self_ping_event(self):
delay = config.get_by_tabname(
"self_ping_delay", self.general_jid, default=0)
if delay <= 0: # use 0 or some negative value to disable it
interval = int(config.get_by_tabname(
"self_ping_interval", self.general_jid, default=delay))
if interval <= 0: # use 0 or some negative value to disable it
return
self.disable_self_ping_event()
self.self_ping_event = timed_events.DelayedEvent(
delay, self.send_self_ping)
interval, self.send_self_ping)
self.core.add_timed_event(self.self_ping_event)
def disable_self_ping_event(self):
......
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