adium 3529:25a2b8bdc366: Fix showing (null) as hostname for new ...
commits at adium.im
commits at adium.im
Mon Nov 15 12:49:14 UTC 2010
details: http://hg.adium.im/adium/rev/25a2b8bdc366
revision: 3529:25a2b8bdc366
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Mon Nov 15 13:47:24 2010 +0100
Fix showing (null) as hostname for new IRC accounts.
diffs (26 lines):
diff -r 63d2c66e8cac -r 25a2b8bdc366 Source/AIURLHandlerPlugin.m
--- a/Source/AIURLHandlerPlugin.m Sun Nov 14 22:02:12 2010 -0800
+++ b/Source/AIURLHandlerPlugin.m Mon Nov 15 13:47:24 2010 +0100
@@ -407,6 +407,7 @@
} 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;
@@ -426,9 +427,13 @@
port = [portNumber intValue];
}
+ if (!hostName.length) {
+ hostName = @"";
+ }
+
channelName = [channelName stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
- [self _openIRCGroupChat:channelName onServer:[url host] withPort:port andPassword:[url query]];
+ [self _openIRCGroupChat:channelName onServer:hostName withPort:port andPassword:[url query]];
} else if ([scheme caseInsensitiveCompare:@"msim"] == NSOrderedSame) {
NSString *contactName = [url queryArgumentForKey:@"cID"];
More information about the commits
mailing list