Changeset 3631
- Timestamp:
- 03/18/07 19:13:13 (2 years ago)
- Files:
-
- trunk/Chat Core/MVIRCChatConnection.m (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Chat Core/MVIRCChatConnection.m
r3630 r3631 1575 1575 if( [msg hasCaseInsensitiveSubstring:@"NickServ"] && [msg hasCaseInsensitiveSubstring:@"IDENTIFY"] ) { 1576 1576 if( ! [self nicknamePassword] ) { 1577 [[NSNotificationCenter defaultCenter] postNotification OnMainThreadWithName:MVChatConnectionNeedNicknamePasswordNotification object:self userInfo:nil];1577 [[NSNotificationCenter defaultCenter] postNotificationName:MVChatConnectionNeedNicknamePasswordNotification object:self userInfo:nil]; 1578 1578 } else [self sendRawMessageImmediatelyWithFormat:@"NickServ IDENTIFY %@", [self nicknamePassword]]; 1579 1579 } else if( [msg hasCaseInsensitiveSubstring:@"password accepted"] ) { … … 1661 1661 } 1662 1662 1663 [[NSNotificationCenter defaultCenter] postNotification OnMainThreadWithName:( request ? MVChatConnectionSubcodeRequestNotification : MVChatConnectionSubcodeReplyNotification ) object:sender userInfo:[NSDictionary dictionaryWithObjectsAndKeys:command, @"command", arguments, @"arguments", nil]];1663 [[NSNotificationCenter defaultCenter] postNotificationName:( request ? MVChatConnectionSubcodeRequestNotification : MVChatConnectionSubcodeReplyNotification ) object:sender userInfo:[NSDictionary dictionaryWithObjectsAndKeys:command, @"command", arguments, @"arguments", nil]]; 1664 1664 1665 1665 NSMethodSignature *signature = [NSMethodSignature methodSignatureWithReturnAndArgumentTypes:@encode( BOOL ), @encode( NSString * ), @encode( NSString * ), @encode( MVChatUser * ), nil]; … … 1783 1783 [transfer _setFinalSize:(unsigned long long)size]; 1784 1784 1785 [[NSNotificationCenter defaultCenter] postNotification OnMainThreadWithName:MVDownloadFileTransferOfferNotification object:transfer];1785 [[NSNotificationCenter defaultCenter] postNotificationName:MVDownloadFileTransferOfferNotification object:transfer]; 1786 1786 1787 1787 [self _addDirectClientConnection:transfer]; … … 1913 1913 } 1914 1914 1915 [[NSNotificationCenter defaultCenter] postNotification OnMainThreadWithName:MVDirectChatConnectionOfferNotification object:directChatConnection userInfo:[NSDictionary dictionaryWithObjectsAndKeys:sender, @"user", nil]];1915 [[NSNotificationCenter defaultCenter] postNotificationName:MVDirectChatConnectionOfferNotification object:directChatConnection userInfo:[NSDictionary dictionaryWithObjectsAndKeys:sender, @"user", nil]]; 1916 1916 1917 1917 [self _addDirectClientConnection:directChatConnection]; … … 2109 2109 - (void) _handleTopic:(NSDictionary *)topicInfo { 2110 2110 MVAssertMainThreadRequired(); 2111 2111 2112 2112 MVChatRoom *room = [topicInfo objectForKey:@"room"]; 2113 2113 MVChatUser *author = [topicInfo objectForKey:@"author"]; 2114 2114 NSMutableData *topic = [[topicInfo objectForKey:@"topic"] mutableCopyWithZone:nil]; 2115 2115 2116 2116 NSMethodSignature *signature = [NSMethodSignature methodSignatureWithReturnAndArgumentTypes:@encode( void ), @encode( NSMutableData * ), @encode( MVChatRoom * ), @encode( MVChatUser * ), nil]; 2117 2117 NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; … … 2120 2120 [invocation setArgument:&room atIndex:3]; 2121 2121 [invocation setArgument:&author atIndex:4]; 2122 2122 2123 2123 [[MVChatPluginManager defaultManager] makePluginsPerformInvocation:invocation]; 2124 2124 2125 2125 [room _setTopic:topic]; 2126 2126 [room _setTopicAuthor:author]; 2127 2127 [room _setTopicDate:[NSDate date]]; 2128 [[NSNotificationCenter defaultCenter] postNotification OnMainThreadWithName:MVChatRoomTopicChangedNotification object:room userInfo:nil];2129 2128 [[NSNotificationCenter defaultCenter] postNotificationName:MVChatRoomTopicChangedNotification object:room userInfo:nil]; 2129 2130 2130 [topic release]; 2131 2131 } … … 2142 2142 MVChatRoom *room = [self joinedChatRoomWithName:[parameters objectAtIndex:0]]; 2143 2143 NSData *topic = [parameters objectAtIndex:1]; 2144 if( ! [topic isKindOfClass:[NSData class]] ) topic = [NSData data];2145 [self performSelectorOnMainThread:@selector( _handleTopic:) withObject:[NSDictionary dictionaryWithObjectsAndKeys:room, @"room", topic, @"topic", sender, @"author", nil] waitUntilDone:NO];2144 if( ! [topic isKindOfClass:[NSData class]] ) topic = nil; 2145 [self performSelectorOnMainThread:@selector( _handleTopic: ) withObject:[NSDictionary dictionaryWithObjectsAndKeys:room, @"room", sender, @"author", topic, @"topic", nil] waitUntilDone:NO]; 2146 2146 } 2147 2147 }
