adium-1.4 3258:e50646701ea8: Now really fix (null) hosts. Silly ...
commits at adium.im
commits at adium.im
Mon Nov 15 14:03:16 UTC 2010
details: http://hg.adium.im/adium-1.4/rev/e50646701ea8
revision: 3258:e50646701ea8
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Mon Nov 15 15:00:47 2010 +0100
Now really fix (null) hosts. Silly me not testing first...
(transplanted from 0a658933d3ad8bb3773b2457d873b435265759c4)
diffs (57 lines):
diff -r 47870a5054ef -r e50646701ea8 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj Mon Nov 15 13:47:24 2010 +0100
+++ b/Adium.xcodeproj/project.pbxproj Mon Nov 15 15:00:47 2010 +0100
@@ -9529,7 +9529,6 @@
};
buildConfigurationList = DADE8E3A085507450062B664 /* Build configuration list for PBXProject "Adium" */;
compatibilityVersion = "Xcode 3.1";
- developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
diff -r 47870a5054ef -r e50646701ea8 Source/AIURLHandlerPlugin.m
--- a/Source/AIURLHandlerPlugin.m Mon Nov 15 13:47:24 2010 +0100
+++ b/Source/AIURLHandlerPlugin.m Mon Nov 15 15:00:47 2010 +0100
@@ -234,7 +234,7 @@
//make sure we have the // in ://, as it simplifies later processing.
if (![[url resourceSpecifier] hasPrefix:@"//"]) {
- urlString = [NSString stringWithFormat:@"%@://%@", [url scheme], [url resourceSpecifier]];
+ urlString = [NSString stringWithFormat:@"%@://%@", [url scheme], ([url resourceSpecifier] ?: @"")];
url = [NSURL URLWithString:urlString];
}
@@ -407,11 +407,10 @@
} else if ([scheme caseInsensitiveCompare:@"irc"] == NSOrderedSame) {
// irc://server:port/channel?password
NSString *channelName = [url fragment];
- NSString *hostName = [url host];
NSNumber *portNumber = [url port];
NSInteger port;
- if (!channelName.length && [url.path.lastPathComponent isEqualToString:@"/"]) {
+ if (!channelName.length && (!url.path.lastPathComponent || [url.path.lastPathComponent isEqualToString:@"/"])) {
channelName = @"#";
} else if (!channelName.length) {
channelName = url.path.lastPathComponent;
@@ -424,16 +423,16 @@
if (portNumber == nil) {
port = -1;
} else {
- port = [portNumber intValue];
+ port = [portNumber integerValue];
}
- if (!hostName.length) {
- hostName = @"";
+ if (!host) {
+ host = @"";
}
channelName = [channelName stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
- [self _openIRCGroupChat:channelName onServer:hostName withPort:port andPassword:[url query]];
+ [self _openIRCGroupChat:channelName onServer:host withPort:port andPassword:[url query]];
} else if ([scheme caseInsensitiveCompare:@"msim"] == NSOrderedSame) {
NSString *contactName = [url queryArgumentForKey:@"cID"];
More information about the commits
mailing list