auto away/xa now send status in gc too

This commit is contained in:
Yann Leboulanger 2005-05-20 21:55:04 +00:00
parent 7611f2d786
commit abe08235b1
1 changed files with 3 additions and 3 deletions

View File

@ -534,20 +534,20 @@ class Interface:
if state == common.sleepy.STATE_AWAKE and \
self.sleeper_state[account] > 1:
#we go online
gajim.connections[account].change_status('online', 'Online')
self.roster.send_status(account, 'online', 'Online')
self.sleeper_state[account] = 1
elif state == common.sleepy.STATE_AWAY and \
self.sleeper_state[account] == 1 and \
gajim.config.get('autoaway'):
#we go away
gajim.connections[account].change_status('away', 'auto away (idle)')
self.roster.send_status(account, 'away', 'auto away (idle)')
self.sleeper_state[account] = 2
elif state == common.sleepy.STATE_XAWAY and (\
self.sleeper_state[account] == 2 or \
self.sleeper_state[account] == 1) and \
gajim.config.get('autoxa'):
#we go extended away
gajim.connections[account].change_status('xa', 'auto away (idle)')
self.roster.send_status(account, 'xa', 'auto away (idle)')
self.sleeper_state[account] = 3
return True # renew timeout (loop for ever)