Changeset 3594
- Timestamp:
- 03/03/07 17:16:55 (1 year ago)
- Files:
-
- trunk/Chat Core/MVICBChatConnection.h (modified) (1 diff)
- trunk/Chat Core/MVICBChatConnection.m (modified) (1 diff)
- trunk/Controllers/MVConnectionsController.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Chat Core/MVICBChatConnection.h
r3582 r3594 78 78 - (unsigned short) serverPort; 79 79 - (void) sendRawMessage:(id) raw immediately:(BOOL) now; 80 - (void) joinChatRoomsNamed:(NSArray *) rooms; 80 81 - (void) joinChatRoomNamed:(NSString *) room withPassphrase: 81 82 (NSString *) passphrase; trunk/Chat Core/MVICBChatConnection.m
r3592 r3594 314 314 } 315 315 316 - (void) joinChatRoomsNamed:(NSArray *) rooms { 317 NSParameterAssert( rooms != nil ); 318 319 if( ! [rooms count] ) 320 return; 321 322 NSEnumerator *enumerator = [rooms objectEnumerator]; 323 NSString *room = nil; 324 325 while( ( room = [enumerator nextObject] ) ) { 326 if( [room length] ) { 327 [self joinChatRoomNamed:room withPassphrase:nil]; 328 break; 329 } 330 } 331 } 332 316 333 - (void) joinChatRoomNamed:(NSString *) name 317 334 withPassphrase:(NSString *) passphrase { 318 [self _joinChatRoomNamed:name withPassphrase:passphrase alreadyJoined:NO]; 335 if( _loggedIn ) 336 [self _joinChatRoomNamed:name withPassphrase:passphrase alreadyJoined:NO]; 337 else 338 MVSafeCopyAssign( &_initialChannel, name ); 319 339 } 320 340 trunk/Controllers/MVConnectionsController.m
r3593 r3594 1857 1857 - (void) _willConnect:(NSNotification *) notification { 1858 1858 MVChatConnection *connection = [notification object]; 1859 1859 1860 if( [self showConsoleOnConnectForConnection:connection] ) 1860 1861 [[JVChatController defaultController] chatConsoleForConnection:connection ifExists:NO]; 1861 } 1862 1863 - (void) _didConnect:(NSNotification *) notification { 1864 MVChatConnection *connection = [notification object]; 1862 1865 1863 NSArray *rooms = [self joinRoomsForConnection:connection]; 1866 1864 NSString *strcommands = [self connectCommandsForConnection:connection]; … … 1908 1906 if( [rooms count] && ! ( [[[NSApplication sharedApplication] currentEvent] modifierFlags] & NSShiftKeyMask ) ) 1909 1907 [connection joinChatRoomsNamed:rooms]; 1910 1908 } 1909 1910 - (void) _didConnect:(NSNotification *) notification { 1911 MVChatConnection *connection = [notification object]; 1911 1912 NSMutableDictionary *context = [NSMutableDictionary dictionary]; 1912 1913 [context setObject:NSLocalizedString( @"Connected", "connected bubble title" ) forKey:@"title"];
