Make a hack in purple-url-handler cleaner.

Wed, 04 Mar 2009 19:32:40 +0000

author
Johannes Buchner <buchner.johannes@gmx.at>
date
Wed, 04 Mar 2009 19:32:40 +0000
changeset 26065
423feb1f53ed
parent 26064
f3efb46c4a43
child 26066
62e990734fcb
child 26067
76081a150b87
child 26068
77b16fe8e9c2

Make a hack in purple-url-handler cleaner.


committer: Will Thompson <resiak@pidgin.im>

COPYRIGHT file | annotate | diff | comparison | revisions
libpurple/purple-url-handler file | annotate | diff | comparison | revisions
--- 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)
 

mercurial