# HG changeset patch # User Richard Laager # Date 1232937325 0 # Node ID 0009541d4ec2eb6321f585fca3909e16267a972f # Parent 681e58ea3a9ba4700908b5a95cf195900ee7b445 In the course of looking at purple-url-handler to compose a response to a post on devel@pidgin.im, I found and fixed a bug where handling an IRC URL will fail if you have any accounts with no user_split in the list of accounts before the IRC account in question. diff -r 681e58ea3a9b -r 0009541d4ec2 libpurple/purple-url-handler --- a/libpurple/purple-url-handler Sun Jan 25 02:00:03 2009 +0000 +++ b/libpurple/purple-url-handler Mon Jan 26 02:35:25 2009 +0000 @@ -207,7 +207,11 @@ def correct_server(account): username = cpurple.PurpleAccountGetUsername(account) - return (server == (username.split("@"))[1]) + 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]) account = findaccount(protocol, matcher=correct_server)