Mercurial > pidgin.yaz
changeset 25460:971b89243a20
Make a hack in purple-url-handler cleaner.
committer: Will Thompson <will.thompson@collabora.co.uk>
author | Johannes Buchner |
---|---|
date | Wed, 04 Mar 2009 19:32:40 +0000 |
parents | 4d758dcd5715 |
children | cf75f0ca4b86 2aba9dac3b95 996a453ff7d7 |
files | COPYRIGHT libpurple/purple-url-handler |
diffstat | 2 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Wed Mar 04 10:39:38 2009 +0000 +++ b/COPYRIGHT Wed Mar 04 19:32:40 2009 +0000 @@ -57,6 +57,7 @@ Philip Brown Dan Bruce Norbert Buchmuller +Johannes Buchner Sean Burke Thomas Butter Trevor Caira
--- a/libpurple/purple-url-handler Wed Mar 04 10:39:38 2009 +0000 +++ b/libpurple/purple-url-handler Wed Mar 04 19:32:40 2009 +0000 @@ -207,11 +207,7 @@ def correct_server(account): username = cpurple.PurpleAccountGetUsername(account) - user_split = (username.split("@")) - # Not all accounts have a split, so append an empty string so the - # [1] doesn't throw an IndexError. - user_split.append("") - return (server == user_split[1]) + return ("@" in username) and (server == (username.split("@"))[1]) account = findaccount(protocol, matcher=correct_server)