Changeset 1869
- Timestamp:
- 09/16/04 20:16:30 (4 years ago)
- Files:
-
- trunk/Chat Core.xcode/project.pbxproj (modified) (6 diffs)
- trunk/Colloquy.xcode/project.pbxproj (modified) (6 diffs)
- trunk/Frameworks/frameworks.tar.gz (modified) (previous)
- trunk/Languages/English.lproj/Credits.rtf (modified) (3 diffs)
- trunk/MVChatConnection.h (modified) (1 diff)
- trunk/MVChatConnection.m (modified) (6 diffs)
- trunk/MVConnectionsController.m (modified) (3 diffs)
- trunk/MVIRCChatConnection.m (modified) (5 diffs)
- trunk/MVSILCChatConnection.h (added)
- trunk/MVSILCChatConnection.m (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Chat Core.xcode/project.pbxproj
r1862 r1869 117 117 1058C7ADFEA557BF11CA2CBB, 118 118 1CCB3C3705228EFD000001C8, 119 1C5A233D06FA4FEE00A51F10, 120 1C5A233E06FA4FEE00A51F10, 119 121 ); 120 122 isa = PBXGroup; … … 270 272 DYLIB_COMPATIBILITY_VERSION = 1; 271 273 DYLIB_CURRENT_VERSION = 1; 274 FRAMEWORK_SEARCH_PATHS = /Users/Timothy/Projects/Colloquy/Frameworks; 272 275 FRAMEWORK_VERSION = A; 273 276 GCC_PRECOMPILE_PREFIX_HEADER = YES; … … 346 349 1CF4E5120698E9E900986498, 347 350 1C5A1A2506F8F4A000A51F10, 351 1C5A230A06FA4F2800A51F10, 348 352 ); 349 353 isa = PBXSourcesBuildPhase; … … 371 375 1CA66045060EAEF3008FCC95, 372 376 1CA66049060EAF05008FCC95, 377 1C5A233F06FA4FEE00A51F10, 378 1C5A234006FA4FEE00A51F10, 373 379 ); 374 380 isa = PBXFrameworksBuildPhase; … … 421 427 1C5A1A2506F8F4A000A51F10 = { 422 428 fileRef = 1C5A1A2306F8F4A000A51F10; 429 isa = PBXBuildFile; 430 settings = { 431 }; 432 }; 433 1C5A230706FA4F2700A51F10 = { 434 fileEncoding = 4; 435 isa = PBXFileReference; 436 lastKnownFileType = sourcecode.c.h; 437 path = MVSILCChatConnection.h; 438 refType = 4; 439 sourceTree = "<group>"; 440 }; 441 1C5A230806FA4F2700A51F10 = { 442 fileEncoding = 4; 443 isa = PBXFileReference; 444 lastKnownFileType = sourcecode.c.objc; 445 path = MVSILCChatConnection.m; 446 refType = 4; 447 sourceTree = "<group>"; 448 }; 449 1C5A230A06FA4F2800A51F10 = { 450 fileRef = 1C5A230806FA4F2700A51F10; 451 isa = PBXBuildFile; 452 settings = { 453 }; 454 }; 455 1C5A233D06FA4FEE00A51F10 = { 456 isa = PBXFileReference; 457 lastKnownFileType = wrapper.framework; 458 name = libsilc.framework; 459 path = Frameworks/libsilc.framework; 460 refType = 4; 461 sourceTree = "<group>"; 462 }; 463 1C5A233E06FA4FEE00A51F10 = { 464 isa = PBXFileReference; 465 lastKnownFileType = wrapper.framework; 466 name = libsilcclient.framework; 467 path = Frameworks/libsilcclient.framework; 468 refType = 4; 469 sourceTree = "<group>"; 470 }; 471 1C5A233F06FA4FEE00A51F10 = { 472 fileRef = 1C5A233D06FA4FEE00A51F10; 473 isa = PBXBuildFile; 474 settings = { 475 }; 476 }; 477 1C5A234006FA4FEE00A51F10 = { 478 fileRef = 1C5A233E06FA4FEE00A51F10; 423 479 isa = PBXBuildFile; 424 480 settings = { … … 3263 3319 1C5A1A2306F8F4A000A51F10, 3264 3320 1C5A1A2206F8F4A000A51F10, 3321 1C5A230806FA4F2700A51F10, 3322 1C5A230706FA4F2700A51F10, 3265 3323 1C943AAA063C260800618CD9, 3266 3324 1C943AA9063C260800618CD9, trunk/Colloquy.xcode/project.pbxproj
r1862 r1869 196 196 1C7055CA0519E56C00A8FE6E, 197 197 1C7055C40519E54C00A8FE6E, 198 1C5A249106FA6AAA00A51F10, 199 1C5A249206FA6AAA00A51F10, 198 200 ); 199 201 isa = PBXGroup; … … 1129 1131 sourceTree = "<group>"; 1130 1132 }; 1133 1C5A232006FA4FC000A51F10 = { 1134 fileEncoding = 4; 1135 isa = PBXFileReference; 1136 lastKnownFileType = sourcecode.c.h; 1137 path = MVSILCChatConnection.h; 1138 refType = 4; 1139 sourceTree = "<group>"; 1140 }; 1141 1C5A232106FA4FC000A51F10 = { 1142 fileEncoding = 4; 1143 isa = PBXFileReference; 1144 lastKnownFileType = sourcecode.c.objc; 1145 path = MVSILCChatConnection.m; 1146 refType = 4; 1147 sourceTree = "<group>"; 1148 }; 1149 1C5A249106FA6AAA00A51F10 = { 1150 isa = PBXFileReference; 1151 lastKnownFileType = wrapper.framework; 1152 name = libsilc.framework; 1153 path = Frameworks/libsilc.framework; 1154 refType = 4; 1155 sourceTree = "<group>"; 1156 }; 1157 1C5A249206FA6AAA00A51F10 = { 1158 isa = PBXFileReference; 1159 lastKnownFileType = wrapper.framework; 1160 name = libsilcclient.framework; 1161 path = Frameworks/libsilcclient.framework; 1162 refType = 4; 1163 sourceTree = "<group>"; 1164 }; 1165 1C5A249306FA6AAA00A51F10 = { 1166 fileRef = 1C5A249106FA6AAA00A51F10; 1167 isa = PBXBuildFile; 1168 settings = { 1169 }; 1170 }; 1171 1C5A249406FA6AAA00A51F10 = { 1172 fileRef = 1C5A249206FA6AAA00A51F10; 1173 isa = PBXBuildFile; 1174 settings = { 1175 }; 1176 }; 1177 1C5A249506FA6AB600A51F10 = { 1178 fileRef = 1C5A249106FA6AAA00A51F10; 1179 isa = PBXBuildFile; 1180 settings = { 1181 }; 1182 }; 1183 1C5A249606FA6AB600A51F10 = { 1184 fileRef = 1C5A249206FA6AAA00A51F10; 1185 isa = PBXBuildFile; 1186 settings = { 1187 }; 1188 }; 1131 1189 1C6075E005138ED600A8FE6E = { 1132 1190 isa = PBXFileReference; … … 1910 1968 ); 1911 1969 buildSettings = { 1912 FRAMEWORK_SEARCH_PATHS = "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\" Frameworks build ";1970 FRAMEWORK_SEARCH_PATHS = "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\" Frameworks build /Users/Timothy/Projects/Colloquy/Frameworks"; 1913 1971 GCC_OPTIMIZATION_LEVEL = 0; 1914 1972 GCC_PRECOMPILE_PREFIX_HEADER = YES; … … 2692 2750 1C3B290806529E720066197C, 2693 2751 1C8D2E72065D0BB600AC28C5, 2752 1C5A249306FA6AAA00A51F10, 2753 1C5A249406FA6AAA00A51F10, 2694 2754 ); 2695 2755 isa = PBXFrameworksBuildPhase; … … 2742 2802 1CB2CD85052DDC560094AAA4, 2743 2803 1CB2CD86052DDC560094AAA4, 2804 1C5A249506FA6AB600A51F10, 2805 1C5A249606FA6AB600A51F10, 2744 2806 ); 2745 2807 isa = PBXCopyFilesBuildPhase; … … 4450 4512 F52D043001873FC401EE70DE, 4451 4513 F52D043101873FC401EE70DE, 4514 1C5A232106FA4FC000A51F10, 4515 1C5A232006FA4FC000A51F10, 4452 4516 1C8CF8E2066530D60080A2F5, 4453 4517 1C8CF8E1066530D60080A2F5, trunk/Languages/English.lproj/Credits.rtf
r1684 r1869 15 15 \f2\fs20 \cf0 Karl Adam (\cf2 karl@colloquy.info\cf0 )\ 16 16 Kevin Ballard (\cf2 kevin@colloquy.info\cf0 )\ 17 Patrik Weiskircher (\cf2 pat@colloquy.info\cf0 )\ 17 18 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 18 19 … … 20 21 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 21 22 22 \fs24 \cf0 Chat Engine23 \fs24 \cf0 IRC Chat Engine 23 24 \f1\b0 \ 24 25 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural … … 30 31 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 31 32 \cf2 \ulnone http://irssi.org\ 33 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 34 35 \f0\b \cf0 \ 36 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 37 38 \fs24 \cf0 SILC Chat Engine 39 \f1\b0 \ 40 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 41 42 \f3\i\fs20 \cf0 SILC Toolkit 43 \f2\i0 \ 44 \'a9 1997-2004 SILC Project under the GPL.\ 45 See the GNU Public License v. 2 for more details.\cf2 \ul \ulc2 \ 46 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 47 \cf2 \ulnone http://silcnet.org\ 32 48 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 33 49 trunk/MVChatConnection.h
r1866 r1869 114 114 unsigned int _nextAltNickIndex; 115 115 } 116 - (id) initWithType:(MVChatConnectionType) type; 116 117 - (id) initWithURL:(NSURL *) url; 117 118 - (id) initWithServer:(NSString *) server type:(MVChatConnectionType) type port:(unsigned short) port user:(NSString *) nickname; trunk/MVChatConnection.m
r1868 r1869 1 1 #import "MVChatConnection.h" 2 2 #import "MVIRCChatConnection.h" 3 #import "MVSILCChatConnection.h" 3 4 #import "MVFileTransfer.h" 4 5 #import "MVChatPluginManager.h" … … 104 105 } 105 106 107 - (id) initWithType:(MVChatConnectionType) type { 108 NSZone *zone = [self zone]; 109 [self release]; 110 111 if( type == MVChatConnectionIRCType ) { 112 self = [[MVIRCChatConnection allocWithZone:zone] init]; 113 } else if ( type == MVChatConnectionSILCType ) { 114 self = [[MVSILCChatConnection allocWithZone:zone] init]; 115 } else self = nil; 116 117 return self; 118 } 119 106 120 - (id) initWithURL:(NSURL *) url { 107 121 int type = 0; 108 122 if( [[url scheme] isEqualToString:@"irc"] ) type = MVChatConnectionIRCType; 109 123 else if( [[url scheme] isEqualToString:@"silc"] ) type = MVChatConnectionSILCType; 110 111 if( ! type ) {112 [self release];113 return nil;114 }115 124 116 125 if( ( self = [self initWithServer:[url host] type:type port:[[url port] unsignedShortValue] user:[url user]] ) ) { … … 123 132 } 124 133 } 134 125 135 return self; 126 136 } 127 137 128 138 - (id) initWithServer:(NSString *) server type:(MVChatConnectionType) type port:(unsigned short) port user:(NSString *) nickname { 129 NSZone *zone = [self zone]; 130 [self release]; 131 132 if( type == MVChatConnectionIRCType ) { 133 self = [[MVIRCChatConnection allocWithZone:zone] init]; 134 } else self = nil; 135 136 if( self ) { 139 if( ( self = [self initWithType:type] ) ) { 137 140 if( [nickname length] ) [self setNickname:nickname]; 138 141 if( [server length] ) [self setServer:server]; … … 695 698 _status = MVChatConnectionDisconnectedStatus; 696 699 [[NSNotificationCenter defaultCenter] postNotificationName:MVChatConnectionDidNotConnectNotification object:self]; 697 [self performSelector:@selector( _detachConnection ) withObject:nil afterDelay:0.]; // wait until the next run loop, so we are done disconnecting698 700 [self _scheduleReconnectAttemptEvery:30.]; 699 701 } … … 718 720 [[NSNotificationCenter defaultCenter] postNotificationName:MVChatConnectionDidDisconnectNotification object:self]; 719 721 } 722 723 #pragma mark - 720 724 721 725 - (void) _scheduleReconnectAttemptEvery:(NSTimeInterval) seconds { … … 729 733 [_reconnectTimer release]; 730 734 _reconnectTimer = nil; 735 } 736 737 #pragma mark - 738 739 - (void) _addRoomToCache:(NSMutableDictionary *) info { 740 [_roomsCache setObject:info forKey:[info objectForKey:@"room"]]; 741 [info removeObjectForKey:@"room"]; 742 743 NSNotification *notification = [NSNotification notificationWithName:MVChatConnectionGotRoomInfoNotification object:self]; 744 [[NSNotificationQueue defaultQueue] enqueueNotification:notification postingStyle:NSPostASAP]; 731 745 } 732 746 @end trunk/MVConnectionsController.m
r1862 r1869 376 376 [openConnection orderOut:nil]; 377 377 378 connection = [[[MVChatConnection alloc] init ] autorelease];378 connection = [[[MVChatConnection alloc] initWithType:MVChatConnectionIRCType] autorelease]; 379 379 [connection setEncoding:[[NSUserDefaults standardUserDefaults] integerForKey:@"JVChatEncoding"]]; 380 380 [connection setProxyType:[[newProxy selectedItem] tag]]; … … 1241 1241 [data setObject:[(MVChatConnection *)[info objectForKey:@"connection"] realName] forKey:@"realName"]; 1242 1242 [data setObject:[(MVChatConnection *)[info objectForKey:@"connection"] username] forKey:@"username"]; 1243 [data setObject:[(MVChatConnection *)[info objectForKey:@"connection"] urlScheme] forKey:@"type"]; 1243 1244 1244 1245 NSMutableArray *permIgnores = [NSMutableArray array]; … … 1269 1270 while( ( info = [enumerator nextObject] ) ) { 1270 1271 MVChatConnection *connection = nil; 1272 MVChatConnectionType type = ( ! [(NSString *)[info objectForKey:@"type"] length] ? MVChatConnectionIRCType : ( [[info objectForKey:@"type"] isEqualToString:@"irc"] ? MVChatConnectionIRCType : ( [[info objectForKey:@"type"] isEqualToString:@"silc"] ? MVChatConnectionSILCType : MVChatConnectionIRCType ) ) ); 1271 1273 1272 1274 if( [info objectForKey:@"url"] ) { 1273 1275 connection = [[[MVChatConnection alloc] initWithURL:[NSURL URLWithString:[info objectForKey:@"url"]]] autorelease]; 1274 1276 } else { 1275 connection = [[[MVChatConnection alloc] initWithServer:[info objectForKey:@"server"] type: MVChatConnectionIRCType port:[[info objectForKey:@"port"] unsignedShortValue] user:[info objectForKey:@"nickname"]] autorelease];1277 connection = [[[MVChatConnection alloc] initWithServer:[info objectForKey:@"server"] type:type port:[[info objectForKey:@"port"] unsignedShortValue] user:[info objectForKey:@"nickname"]] autorelease]; 1276 1278 } 1277 1279 trunk/MVIRCChatConnection.m
r1868 r1869 57 57 - (SERVER_CONNECT_REC *) _irssiConnectSettings; 58 58 - (void) _setIrssiConnectSettings:(SERVER_CONNECT_REC *) settings; 59 - (void) _addRoomToCache:(NSMutableDictionary *) info;60 59 - (void) _nicknameIdentified:(BOOL) identified; 61 60 - (void) _forceDisconnect; … … 830 829 if( ! tooLate ) { 831 830 MVIRCChatConnectionThreadLock = [[NSRecursiveLock alloc] init]; 832 [NSThread detachNewThreadSelector:@selector( _ connectionRunLoop ) toTarget:self withObject:nil];831 [NSThread detachNewThreadSelector:@selector( _irssiRunLoop ) toTarget:self withObject:nil]; 833 832 tooLate = YES; 834 833 } … … 1559 1558 } 1560 1559 1561 + (void) _ connectionRunLoop {1560 + (void) _irssiRunLoop { 1562 1561 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 1563 1562 … … 1593 1592 extern unsigned int connectionCount; 1594 1593 while( ! MVChatApplicationQuitting || connectionCount ) { 1595 usleep( 10 ); // give time for other theads to lock1594 usleep( 50 ); // give time for other theads to lock 1596 1595 if( [MVIRCChatConnectionThreadLock tryLock] ) { // prevents some deadlocks 1597 1596 g_main_iteration( TRUE ); … … 1676 1675 1677 1676 [MVIRCChatConnectionThreadLock unlock]; 1678 }1679 1680 #pragma mark -1681 1682 - (void) _addRoomToCache:(NSMutableDictionary *) info {1683 [_roomsCache setObject:info forKey:[info objectForKey:@"room"]];1684 [info removeObjectForKey:@"room"];1685 1686 NSNotification *notification = [NSNotification notificationWithName:MVChatConnectionGotRoomInfoNotification object:self];1687 [[NSNotificationQueue defaultQueue] enqueueNotification:notification postingStyle:NSPostASAP];1688 1677 } 1689 1678
