diff options
author | diSabler <dissy@ya.ru> | 2013-07-27 16:10:13 +0400 |
---|---|---|
committer | diSabler <dissy@ya.ru> | 2013-07-27 16:10:13 +0400 |
commit | 95cde1166cd50fd074e65a8e350729e09183e3eb (patch) | |
tree | 4d8d675fa26cdf7a91d90ee27c9dff75bc6539c4 | |
parent | aca1ecc13cf37f1a7c580c62e6d3b0360e291ee3 (diff) |
fix: user defined fields in vcard_raw
-rw-r--r-- | plugins/iq.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/iq.py b/plugins/iq.py index 93e6034..55b6d17 100644 --- a/plugins/iq.py +++ b/plugins/iq.py @@ -148,10 +148,10 @@ def vcard_async(type, jid, nick, text, args, is_answ): args,dd = args.split('|'),[] for t in args: if ':' in t: val,loc = t.split(':',1) - else: val,loc = t,t + else: val,loc = t,t.upper() val = val.upper() dv = get_array_from_array2(data,(val)) - if dv: dd += dv + if dv: dd += [[loc,dv[0][1]]] if dd: msg = '%s\n%s' % (L('vCard:','%s/%s'%(jid,nick)),'\n'.join(['%s: %s' % ([L(t[0]),t[0].capitalize()][L(t[0])==t[0]],[u'%s…' % t[1][:VCARD_LIMIT_LONG],t[1]][len(t[1])<VCARD_LIMIT_LONG]) for t in dd])) else: msg = '%s %s' % (L('vCard:','%s/%s'%(jid,nick)),L('Not found!','%s/%s'%(jid,nick))) else: msg = '%s %s' % (L('vCard:','%s/%s'%(jid,nick)),L('Empty!','%s/%s'%(jid,nick))) |