Changeset 13293
- Timestamp:
- 08/29/2005 09:38:03 PM (3 years ago)
- Files:
-
- trunk/Plugins/Gaim Service/ESGaimJabberAccount.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Plugins/Gaim Service/ESGaimJabberAccount.m
r13093 r13293 172 172 * Rather than having a separate server field, Jabber uses the servername after the user name. 173 173 * username@server.org 174 * 175 * The connect server, stored in KEY_JABBER_CONNECT_SERVER, overrides this to provide the connect host. It will 176 * not be set in most cases. 174 177 */ 175 178 - (NSString *)host 176 179 { 177 int location = [UID rangeOfString:@"@"].location; 178 if ((location != NSNotFound) && (location + 1 < [UID length])) { 179 return [UID substringFromIndex:(location + 1)]; 180 } else { 181 return DEFAULT_JABBER_HOST; 182 } 180 NSString *host; 181 182 if (!(host = [self preferenceForKey:KEY_JABBER_CONNECT_SERVER group:GROUP_ACCOUNT_STATUS])) { 183 int location = [UID rangeOfString:@"@"].location; 184 185 if ((location != NSNotFound) && (location + 1 < [UID length])) { 186 host = [UID substringFromIndex:(location + 1)]; 187 188 } else { 189 host = DEFAULT_JABBER_HOST; 190 } 191 } 192 193 return host; 183 194 } 184 195