Changeset 3650

Show
Ignore:
Timestamp:
05/18/07 23:49:32 (1 year ago)
Author:
rinoa
Message:

Fixes where changing the limit and password on a room mode wouldn't display in the chatroom, even though the change was made. #1034

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Chat Core/MVIRCChatConnection.m

    r3637 r3650  
    21382138 
    21392139        unsigned long oldModes = [room modes]; 
     2140        unsigned long argModes = 0; 
    21402141        unsigned long value = 0; 
    21412142        NSMutableArray *argsNeeded = [[NSMutableArray allocWithZone:nil] initWithCapacity:10]; 
     
    21852186                                                        goto queue; 
    21862187                                                case 'k': 
    2187                                                         if( ! enabled ) [room _removeMode:MVChatRoomPassphraseToJoinMode]; 
     2188                                                        if( ! enabled ) { 
     2189                                                                [room _removeMode:MVChatRoomPassphraseToJoinMode]; 
     2190                                                                break; 
     2191                                                        } 
    21882192                                                        value = MVChatRoomPassphraseToJoinMode; 
    21892193                                                        goto queue; 
     
    22372241                                                } 
    22382242                                        } else if( mode == MVChatRoomLimitNumberOfMembersMode && enabled ) { 
     2243                                                argModes |= MVChatRoomLimitNumberOfMembersMode; 
    22392244                                                [room _setMode:MVChatRoomLimitNumberOfMembersMode withAttribute:[NSNumber numberWithInt:[param intValue]]]; 
    2240                                         } else if( mode == MVChatRoomPassphraseToJoinMode ) { 
    2241                                                 if( enabled ) [room _setMode:MVChatRoomPassphraseToJoinMode withAttribute:param]
    2242                                                 else [room _removeMode:MVChatRoomPassphraseToJoinMode]; 
     2245                                        } else if( mode == MVChatRoomPassphraseToJoinMode && enabled ) { 
     2246                                                argModes |= MVChatRoomPassphraseToJoinMode
     2247                                                [room _setMode:MVChatRoomPassphraseToJoinMode withAttribute:param]; 
    22432248                                        } 
    22442249 
     
    22562261        [argsNeeded release]; 
    22572262 
    2258         unsigned int changedModes = ( oldModes ^ [room modes] )
     2263        unsigned int changedModes = ( oldModes ^ [room modes] ) | argModes
    22592264        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:MVChatRoomModesChangedNotification object:room userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInt:changedModes], @"changedModes", sender, @"by", nil]]; 
    22602265} 
  • trunk/Inspectors/JVChatRoomInspector.m

    r3514 r3650  
    135135                if( enabled ) [(MVChatRoom *)[_room target] setMode:MVChatRoomPassphraseToJoinMode withAttribute:[sender stringValue]]; 
    136136                else { 
     137                        [(MVChatRoom *)[_room target] removeMode:MVChatRoomPassphraseToJoinMode]; 
    137138                        [requiresPassword setState:NSOffState]; 
    138139                        [sender setEnabled:NO]; 
     
    142143                if( enabled ) [(MVChatRoom *)[_room target] setMode:MVChatRoomLimitNumberOfMembersMode withAttribute:[sender stringValue]]; 
    143144                else { 
     145                        [(MVChatRoom *)[_room target] removeMode:MVChatRoomLimitNumberOfMembersMode]; 
    144146                        [limitMembers setState:NSOffState]; 
    145147                        [sender setEnabled:NO]; 
  • trunk/Languages/Dutch.lproj/JVRoomInspector.nib/info.nib

    r2997 r3650  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>111 54 356 240 0 0 1024 746 </string> 
     6        <string>180 68 356 240 0 0 1440 878 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
    99                <key>263</key> 
    10                 <string>64 286 335 403 0 0 1024 746 </string> 
     10                <string>552 396 335 403 0 0 1440 878 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
    13         <string>439.0</string> 
     13        <string>446.1</string> 
    1414        <key>IBGroupedObjects</key> 
    1515        <dict> 
     
    4545        </array> 
    4646        <key>IBSystem Version</key> 
    47         <string>8C46</string> 
     47        <string>8P2137</string> 
    4848</dict> 
    4949</plist> 
  • trunk/Languages/English.lproj/JVRoomInspector.nib/info.nib

    r2979 r3650  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>153 81 356 240 0 0 1280 1002 </string> 
     6        <string>179 68 356 240 0 0 1440 878 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
    99                <key>263</key> 
    10                 <string>304 433 335 403 0 0 1280 1002 </string> 
     10                <string>552 396 335 403 0 0 1440 878 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
    13         <string>442.0</string> 
     13        <string>446.1</string> 
    1414        <key>IBGroupedObjects</key> 
    1515        <dict> 
     
    4545        </array> 
    4646        <key>IBSystem Version</key> 
    47         <string>8C46</string> 
     47        <string>8P2137</string> 
    4848</dict> 
    4949</plist> 
  • trunk/Languages/French.lproj/JVRoomInspector.nib/info.nib

    r3040 r3650  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>111 54 356 240 0 0 1024 746 </string> 
     6        <string>180 68 356 240 0 0 1440 878 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
    99                <key>263</key> 
    10                 <string>344 308 335 403 0 0 1024 746 </string> 
     10                <string>552 396 335 403 0 0 1440 878 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
    13         <string>439.0</string> 
     13        <string>446.1</string> 
    1414        <key>IBGroupedObjects</key> 
    1515        <dict> 
     
    4747        </array> 
    4848        <key>IBSystem Version</key> 
    49         <string>8F46</string> 
     49        <string>8P2137</string> 
    5050</dict> 
    5151</plist> 
  • trunk/Languages/German.lproj/JVRoomInspector.nib/info.nib

    r3575 r3650  
    2525        </array> 
    2626        <key>IBSystem Version</key> 
    27         <string>8L2127</string> 
     27        <string>8P2137</string> 
    2828</dict> 
    2929</plist> 
  • trunk/Languages/Italian.lproj/JVRoomInspector.nib/info.nib

    r3536 r3650  
    4747        </array> 
    4848        <key>IBSystem Version</key> 
    49         <string>8L2127</string> 
     49        <string>8P2137</string> 
    5050</dict> 
    5151</plist> 
  • trunk/Languages/Spanish.lproj/JVRoomInspector.nib/info.nib

    r3441 r3650  
    88        <dict> 
    99                <key>263</key> 
    10                 <string>102 364 335 403 0 0 1440 878 </string> 
     10                <string>552 396 335 403 0 0 1440 878 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
     
    4040        <key>IBOldestOS</key> 
    4141        <integer>3</integer> 
     42        <key>IBOpenObjects</key> 
     43        <array> 
     44                <integer>263</integer> 
     45        </array> 
    4246        <key>IBSystem Version</key> 
    43         <string>8L2127</string> 
     47        <string>8P2137</string> 
    4448</dict> 
    4549</plist> 
  • trunk/Languages/pt_PT.lproj/JVRoomInspector.nib/info.nib

    r3535 r3650  
    4747        </array> 
    4848        <key>IBSystem Version</key> 
    49         <string>8L2127</string> 
     49        <string>8P2137</string> 
    5050</dict> 
    5151</plist> 
  • trunk/Languages/zh_TW.lproj/JVRoomInspector.nib/info.nib

    r3062 r3650  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>153 81 356 240 0 0 1280 1002 </string> 
     6        <string>179 68 356 240 0 0 1440 878 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
    99                <key>263</key> 
    10                 <string>304 433 335 403 0 0 1280 1002 </string> 
     10                <string>552 396 335 403 0 0 1440 878 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
    13         <string>443.0</string> 
     13        <string>446.1</string> 
    1414        <key>IBLockedObjects</key> 
    1515        <array/> 
     
    2020        <key>IBOldestOS</key> 
    2121        <integer>3</integer> 
     22        <key>IBOpenObjects</key> 
     23        <array> 
     24                <integer>263</integer> 
     25        </array> 
    2226        <key>IBSystem Version</key> 
    23         <string>8F46</string> 
     27        <string>8P2137</string> 
    2428</dict> 
    2529</plist> 
  • trunk/Panels/JVDirectChatPanel.m

    r3644 r3650  
    224224                                logs = [logs stringByAppendingPathComponent:logName]; 
    225225 
    226                               _sqlTestTranscript = [[JVSQLChatTranscript alloc] initWithContentsOfFile:[[logs stringByDeletingPathExtension] stringByAppendingPathExtension:@"colloquySQLTranscript"]]; 
     226//                            _sqlTestTranscript = [[JVSQLChatTranscript alloc] initWithContentsOfFile:[[logs stringByDeletingPathExtension] stringByAppendingPathExtension:@"colloquySQLTranscript"]]; 
    227227 
    228228                                if( [fileManager fileExistsAtPath:logs] ) 
     
    732732 
    733733        JVChatEvent *newEvent = [[self transcript] appendEvent:event]; 
    734       [_sqlTestTranscript appendEvent:event]; 
     734//    [_sqlTestTranscript appendEvent:event]; 
    735735        [display appendChatTranscriptElement:newEvent]; 
    736736 
     
    871871 
    872872        JVChatMessage *newMessage = [[self transcript] appendMessage:cmessage]; 
    873       [_sqlTestTranscript appendMessage:cmessage]; 
     873//    [_sqlTestTranscript appendMessage:cmessage]; 
    874874 
    875875        if( [display appendChatMessage:newMessage] ) {