Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr/buddylist presence show #11

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
18 changes: 13 additions & 5 deletions plugin/vimchat.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,15 @@ You can type \on to reconnect.
******************************
""" % (curJid))
continue
accountText = u"{{{ [+] %s\n"%(curJid)
accountPresenceInfo = account.jabberGetPresence()
if accountPresenceInfo[0] != None:
status = str(accountPresenceInfo[1])
if status == "None":
status = ''
accountText = u"{{{ [+] %s\n\t%s: %s\n"%\
(curJid,str(accountPresenceInfo[0]),status)
else:
accountText = u"{{{ [+] %s\n"%(curJid)
rF.write(accountText)

roster = account._roster
Expand Down Expand Up @@ -1120,8 +1128,8 @@ You can type \on to reconnect.

if show != u'off':
buddyText =\
u"{{{ (%s) %s\n\t%s \n\tGroups: %s\n\t%s:\n%s\n}}}\n" %\
(show, name, item, groups, show, status)
u"{{{ (%s) %s\n\t%s \n\tGroups: %s\n\t%s: %s\n}}}\n" %\
(show, name, item, groups, show, status)
rF.write(buddyText)

rF.write("}}}\n")
Expand Down Expand Up @@ -1529,8 +1537,8 @@ You can type \on to reconnect.
def setStatus(self, status=None):
if not status:
status = str(
vim.eval('input("Status: (away,xa,dnd,chat),message,\
priority: ")'))
vim.eval('input("Status: (away,xa,dnd,chat),message,'+
'priority: ")'))

parts = status.split(',')
show = parts[0]
Expand Down