Skip to content
Snippets Groups Projects
Commit f6d16b1d authored by nkour's avatar nkour
Browse files

sleeper_state now holds string instead of 0 1 2 3

parent 123cfb70
No related branches found
No related tags found
No related merge requests found
......@@ -53,8 +53,9 @@ awaiting_messages = {} # list of messages reveived but not printed
nicks = {} # list of our nick names in each account
allow_notifications = {} # do we allow notifications for each account ?
con_types = {} # type of each connection (ssl, tls, tcp, ...)
sleeper_state = {} #whether we pass auto away / xa or not
#0:don't use sleeper for this account
#1:online and use sleeper
#2:autoaway and use sleeper
#3:autoxa and use sleeper
sleeper_state = {} # whether we pass auto away / xa or not
#'off': don't use sleeper for this account
#'online': online and use sleeper
#'autoaway': autoaway and use sleeper
#'autoxa': autoxa and use sleeper
......@@ -1246,7 +1246,7 @@ _('To change the account name, you must be disconnected.')).get_response()
gajim.to_be_removed[name] = []
gajim.nicks[name] = config['name']
gajim.allow_notifications[name] = False
gajim.sleeper_state[name] = 0
gajim.sleeper_state[name] = 'off'
gajim.encrypted_chats[name] = []
gajim.last_message_time[name] = {}
#refresh accounts window
......
......@@ -1231,9 +1231,9 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
txt)
if status == 'online' and self.plugin.sleeper.getState() != \
common.sleepy.STATE_UNKNOWN:
gajim.sleeper_state[account] = True
gajim.sleeper_state[account] = 'online'
else:
gajim.sleeper_state[account] = False
gajim.sleeper_state[account] = 'off'
def get_status_message(self, show):
if (show == 'online' and not gajim.config.get('ask_online_status')) or \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment