Changeset 3300
- Timestamp:
- 06/13/06 02:21:08 (2 years ago)
- Files:
-
- trunk/Chat Core/MVIRCChatConnection.m (modified) (2 diffs)
- trunk/Inspectors/JVChatMemberInspector.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Chat Core/MVIRCChatConnection.m
r3293 r3300 2044 2044 if( [parameters count] == 3 ) { 2045 2045 MVChatUser *user = [self chatUserWithUniqueIdentifier:[parameters objectAtIndex:1]]; 2046 if( [[user awayStatusMessage] isEqual:[parameters objectAtIndex:2]] ) {2047 [ sender _setStatus:MVChatUserAwayStatus];2046 if( ! [[user awayStatusMessage] isEqual:[parameters objectAtIndex:2]] ) { 2047 [user _setStatus:MVChatUserAwayStatus]; 2048 2048 [user _setAwayStatusMessage:[parameters objectAtIndex:2]]; 2049 2049 [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:MVChatUserAwayStatusMessageChangedNotification object:user userInfo:nil]; … … 2233 2233 [user _setRealName:[self _stringFromPossibleData:[parameters objectAtIndex:5]]]; 2234 2234 [user _setDateDisconnected:nil]; 2235 [user _setAwayStatusMessage:nil]; // set this to nil, we will get it if we get a 301 2235 2236 2236 2237 [self _sendPossibleOnlineNotificationForUser:user]; trunk/Inspectors/JVChatMemberInspector.m
r3297 r3300 89 89 #pragma mark - 90 90 91 - (NSMutableAttributedString *) _convertRawMessage:(NSData *) message withBaseFont:(NSFont *) baseFont { 92 if( ! message || ! [message length] ) return nil; 93 if( ! baseFont ) baseFont = [NSFont labelFontOfSize:11.]; 94 95 NSMutableDictionary *options = [NSMutableDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInt:[[_member connection] encoding]], @"StringEncoding", [NSNumber numberWithBool:[[NSUserDefaults standardUserDefaults] boolForKey:@"JVChatStripMessageColors"]], @"IgnoreFontColors", [NSNumber numberWithBool:[[NSUserDefaults standardUserDefaults] boolForKey:@"JVChatStripMessageFormatting"]], @"IgnoreFontTraits", baseFont, @"BaseFont", nil]; 96 NSMutableAttributedString *messageString = [NSMutableAttributedString attributedStringWithChatFormat:message options:options]; 97 98 if( ! messageString ) { 99 [options setObject:[NSNumber numberWithUnsignedInt:NSISOLatin1StringEncoding] forKey:@"StringEncoding"]; 100 messageString = [NSMutableAttributedString attributedStringWithChatFormat:message options:options]; 101 } 102 103 return messageString; 104 } 105 91 106 - (void) gotAddress:(NSString *) ip { 92 107 [address setObjectValue:( ip ? ip : NSLocalizedString( @"n/a", "not applicable or not available" ) )]; … … 111 126 [class setObjectValue:NSLocalizedString( @"Normal user", "normal user class" )]; 112 127 } 128 129 NSData *awayData = [[_member user] awayStatusMessage]; 130 NSAttributedString *awayString = [self _convertRawMessage:awayData withBaseFont:nil]; 131 if( ! awayString || ! [awayString length] ) [away setObjectValue:NSLocalizedString( @"n/a", "not applicable or not available" )]; 132 else [away setObjectValue:awayString]; 113 133 114 134 [username setObjectValue:[[_member user] username]];
