adium-1.4 3257:47870a5054ef: Fix showing (null) as hostname for ...

commits at adium.im commits at adium.im
Mon Nov 15 13:01:32 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/47870a5054ef
revision:	3257:47870a5054ef
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.
(transplanted from 25a2b8bdc3660a273436059bd3f0ef1aeb719b04)

diffs (26 lines):

diff -r e549a5d6e6dd -r 47870a5054ef Source/AIURLHandlerPlugin.m
--- a/Source/AIURLHandlerPlugin.m	Sun Nov 14 19:46:52 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