self-ping: rename option from 'delay' to 'interval'
This commit is contained in:
parent
0fca40246b
commit
0ee4bb6129
2 changed files with 5 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue