changeset 16453:81e3c44ecaac

merge of 'a236381404a31c3fc3022f03ec28de22f6fd1258' and 'ec4bf7641bb15de964f361b7b53db8ceb143258f'
author Luke Schierer <lschiere@pidgin.im>
date Thu, 26 Apr 2007 20:04:09 +0000
parents e3401609d377 (current diff) 27dfbca8dd40 (diff)
children 2b106533b077
files
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/purple-url-handler	Thu Apr 26 20:04:02 2007 +0000
+++ b/libpurple/purple-url-handler	Thu Apr 26 20:04:09 2007 +0000
@@ -92,13 +92,13 @@
 
 def aim(uri):
     protocol = "prpl-aim"
-    match = re.match(r"^(aim):([^?]*)(\?(.*))", uri)
+    match = re.match(r"^aim:([^?]*)(\?(.*))", uri)
     if not match:
         print "Invalid aim URI: %s" % uri
         return
 
-    command = urllib.unquote_plus(match.group(2))
-    paramstring = match.group(4)
+    command = urllib.unquote_plus(match.group(1))
+    paramstring = match.group(3)
     params = {}
     if paramstring:
         for param in paramstring.split("&"):
@@ -129,13 +129,13 @@
 
 def icq(uri):
     protocol = "prpl-icq"
-    match = re.match(r"^(icq):([^?]*)(\?(.*))", uri)
+    match = re.match(r"^icq:([^?]*)(\?(.*))", uri)
     if not match:
-        print "Invalid aim URI: %s" % uri
+        print "Invalid icq URI: %s" % uri
         return
 
-    command = urllib.unquote_plus(match.group(2))
-    paramstring = match.group(4)
+    command = urllib.unquote_plus(match.group(1))
+    paramstring = match.group(3)
     params = {}
     if paramstring:
         for param in paramstring.split("&"):
@@ -225,26 +225,26 @@
 
 def xmpp(uri):
     protocol = "prpl-jabber"
-    match = re.match(r"^xmpp:((//)?([^/?#]*))?(/?([^?#]*))(\?([^;#]*)(;([^#]*))?)?(#(.*))?", uri)
+    match = re.match(r"^xmpp:(//([^/?#]*)/?)?([^?#]*)(\?([^;#]*)(;([^#]*))?)?(#(.*))?", uri)
     if not match:
         print "Invalid xmpp URI: %s" % uri
         return
 
-    tmp = match.group(3)
+    tmp = match.group(2)
     if (tmp):
         accountname = urllib.unquote_plus(tmp)
     else:
         accountname = ""
 
-    screenname = urllib.unquote_plus(match.group(5))
+    screenname = urllib.unquote_plus(match.group(3))
 
-    tmp = match.group(7)
+    tmp = match.group(5)
     if (tmp):
         command = urllib.unquote_plus(tmp)
     else:
         command = ""
 
-    paramstring = match.group(9)
+    paramstring = match.group(7)
     params = {}
     if paramstring:
         for param in paramstring.split(";"):