Changeset 3451

Show
Ignore:
Timestamp:
12/10/06 19:12:06 (2 years ago)
Author:
timothy
Message:

Adding more constants for various objects in Colloquy and Chat Core.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plug-Ins/JavaScript Support/plugin.html

    r3450 r3451  
    4545        var obj = Plugin.allocInstance('JVMutableChatEvent'); 
    4646        if( name !== undefined && message !== undefined ) 
    47                 return obj.initWithName(name, message); 
     47                return obj.initWithName(name.toString(), message); 
    4848        return obj.init(); 
    4949} 
     50 
     51MVChatConnectionIRCType = 'ircC'.fourCharCode(); 
     52MVChatConnectionSILCType = 'silC'.fourCharCode(); 
     53 
     54MVChatConnectionDisconnectedStatus = 'disC'.fourCharCode(); 
     55MVChatConnectionServerDisconnectedStatus = 'sdsC'.fourCharCode(); 
     56MVChatConnectionConnectingStatus = 'conG'.fourCharCode(); 
     57MVChatConnectionConnectedStatus = 'conD'.fourCharCode(); 
     58MVChatConnectionSuspendedStatus = 'susP'.fourCharCode(); 
     59 
     60MVChatConnectionNoProxy = 'nonE'.fourCharCode(); 
     61MVChatConnectionHTTPProxy = 'httP'.fourCharCode(); 
     62MVChatConnectionHTTPSProxy = 'htpS'.fourCharCode(); 
     63MVChatConnectionSOCKS4Proxy = 'soK4'.fourCharCode(); 
     64MVChatConnectionSOCKS5Proxy = 'soK5'.fourCharCode(); 
     65 
     66MVChatConnectionServerPublicKeyType = 'serV'.fourCharCode(); 
     67MVChatConnectionClientPublicKeyType = 'clnT'.fourCharCode(); 
     68 
     69MVChatConnectionDefaultMessageFormat = 'cDtF'.fourCharCode(); 
     70MVChatNoMessageFormat = 'nOcF'.fourCharCode(); 
     71MVChatWindowsIRCMessageFormat = 'mIrF'.fourCharCode(); 
     72MVChatCTCPTwoMessageFormat = 'ct2F'.fourCharCode(); 
     73 
     74MVChatConnectionNoSuchUserError = -1; 
     75MVChatConnectionNoSuchRoomError = -2; 
     76MVChatConnectionNoSuchServerError = -3; 
     77MVChatConnectionCantSendToRoomError = -4; 
     78MVChatConnectionNotInRoomError = -5; 
     79MVChatConnectionUserNotInRoomError = -6; 
     80MVChatConnectionRoomIsFullError = -7; 
     81MVChatConnectionInviteOnlyRoomError = -8; 
     82MVChatConnectionRoomPasswordIncorrectError = -9; 
     83MVChatConnectionBannedFromRoomError = -10; 
     84MVChatConnectionUnknownCommandError = -11; 
     85MVChatConnectionErroneusNicknameError = -12; 
     86MVChatConnectionBannedFromServerError = -13; 
     87MVChatConnectionServerPasswordIncorrectError = -14; 
     88 
     89function MVChatConnection(type, server, port, user) { 
     90        var obj = Plugin.allocInstance('MVChatConnection'); 
     91        if( type !== undefined && ! isNaN(type) && server !== undefined && port !== undefined && ! isNaN(port) && user !== undefined ) 
     92                return obj.initWithServer(server, parseInt(type), parseInt(port), user); 
     93        if( type !== undefined && ! isNaN(type) ) 
     94                return obj.initWithType(parseInt(type)); 
     95        throw "Can't create a MVChatConnection without a type."; 
     96} 
     97 
     98MVChatRoomNoModes = 0; 
     99MVChatRoomPrivateMode = 1 << 0; 
     100MVChatRoomSecretMode = 1 << 1; 
     101MVChatRoomInviteOnlyMode = 1 << 2; 
     102MVChatRoomNormalUsersSilencedMode = 1 << 3; 
     103MVChatRoomOperatorsSilencedMode = 1 << 4; 
     104MVChatRoomOperatorsOnlySetTopicMode = 1 << 5; 
     105MVChatRoomNoOutsideMessagesMode = 1 << 6; 
     106MVChatRoomPassphraseToJoinMode = 1 << 7; 
     107MVChatRoomLimitNumberOfMembersMode = 1 << 8; 
     108 
     109MVChatRoomMemberNoModes = 0; 
     110MVChatRoomMemberQuietedMode = 1 << 0; 
     111MVChatRoomMemberVoicedMode = 1 << 1; 
     112MVChatRoomMemberHalfOperatorMode = 1 << 2; 
     113MVChatRoomMemberOperatorMode = 1 << 3; 
     114MVChatRoomMemberAdministratorMode = 1 << 4; 
     115MVChatRoomMemberFounderMode = 1 << 5; 
     116 
     117MVChatRemoteUserType = 'remT'.fourCharCode(); 
     118MVChatLocalUserType = 'locL'.fourCharCode(); 
     119MVChatWildcardUserType = 'wilD'.fourCharCode(); 
     120 
     121MVChatUserUnknownStatus = 'uKnw'.fourCharCode(); 
     122MVChatUserOfflineStatus = 'oflN'.fourCharCode(); 
     123MVChatUserDetachedStatus = 'detA'.fourCharCode(); 
     124MVChatUserAvailableStatus = 'avaL'.fourCharCode(); 
     125MVChatUserAwayStatus = 'awaY'.fourCharCode(); 
     126 
     127MVChatUserNoModes = 0; 
     128MVChatUserInvisibleMode = 1 << 0; 
     129 
     130MVFileTransferDoneStatus = 'trDn'.fourCharCode(); 
     131MVFileTransferNormalStatus = 'trNo'.fourCharCode(); 
     132MVFileTransferHoldingStatus = 'trHo'.fourCharCode(); 
     133MVFileTransferStoppedStatus = 'trSt'.fourCharCode(); 
     134MVFileTransferErrorStatus = 'trEr'.fourCharCode(); 
     135 
     136MVFileTransferConnectionError = -1; 
     137MVFileTransferFileCreationError = -2; 
     138MVFileTransferFileOpenError = -3; 
     139MVFileTransferAlreadyExistsError = -4; 
     140MVFileTransferUnexpectedlyEndedError = -5; 
     141MVFileTransferKeyAgreementError = -6; 
     142 
    50143</script> 
    51144</head>