| | 50 | |
|---|
| | 51 | MVChatConnectionIRCType = 'ircC'.fourCharCode(); |
|---|
| | 52 | MVChatConnectionSILCType = 'silC'.fourCharCode(); |
|---|
| | 53 | |
|---|
| | 54 | MVChatConnectionDisconnectedStatus = 'disC'.fourCharCode(); |
|---|
| | 55 | MVChatConnectionServerDisconnectedStatus = 'sdsC'.fourCharCode(); |
|---|
| | 56 | MVChatConnectionConnectingStatus = 'conG'.fourCharCode(); |
|---|
| | 57 | MVChatConnectionConnectedStatus = 'conD'.fourCharCode(); |
|---|
| | 58 | MVChatConnectionSuspendedStatus = 'susP'.fourCharCode(); |
|---|
| | 59 | |
|---|
| | 60 | MVChatConnectionNoProxy = 'nonE'.fourCharCode(); |
|---|
| | 61 | MVChatConnectionHTTPProxy = 'httP'.fourCharCode(); |
|---|
| | 62 | MVChatConnectionHTTPSProxy = 'htpS'.fourCharCode(); |
|---|
| | 63 | MVChatConnectionSOCKS4Proxy = 'soK4'.fourCharCode(); |
|---|
| | 64 | MVChatConnectionSOCKS5Proxy = 'soK5'.fourCharCode(); |
|---|
| | 65 | |
|---|
| | 66 | MVChatConnectionServerPublicKeyType = 'serV'.fourCharCode(); |
|---|
| | 67 | MVChatConnectionClientPublicKeyType = 'clnT'.fourCharCode(); |
|---|
| | 68 | |
|---|
| | 69 | MVChatConnectionDefaultMessageFormat = 'cDtF'.fourCharCode(); |
|---|
| | 70 | MVChatNoMessageFormat = 'nOcF'.fourCharCode(); |
|---|
| | 71 | MVChatWindowsIRCMessageFormat = 'mIrF'.fourCharCode(); |
|---|
| | 72 | MVChatCTCPTwoMessageFormat = 'ct2F'.fourCharCode(); |
|---|
| | 73 | |
|---|
| | 74 | MVChatConnectionNoSuchUserError = -1; |
|---|
| | 75 | MVChatConnectionNoSuchRoomError = -2; |
|---|
| | 76 | MVChatConnectionNoSuchServerError = -3; |
|---|
| | 77 | MVChatConnectionCantSendToRoomError = -4; |
|---|
| | 78 | MVChatConnectionNotInRoomError = -5; |
|---|
| | 79 | MVChatConnectionUserNotInRoomError = -6; |
|---|
| | 80 | MVChatConnectionRoomIsFullError = -7; |
|---|
| | 81 | MVChatConnectionInviteOnlyRoomError = -8; |
|---|
| | 82 | MVChatConnectionRoomPasswordIncorrectError = -9; |
|---|
| | 83 | MVChatConnectionBannedFromRoomError = -10; |
|---|
| | 84 | MVChatConnectionUnknownCommandError = -11; |
|---|
| | 85 | MVChatConnectionErroneusNicknameError = -12; |
|---|
| | 86 | MVChatConnectionBannedFromServerError = -13; |
|---|
| | 87 | MVChatConnectionServerPasswordIncorrectError = -14; |
|---|
| | 88 | |
|---|
| | 89 | function 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 | |
|---|
| | 98 | MVChatRoomNoModes = 0; |
|---|
| | 99 | MVChatRoomPrivateMode = 1 << 0; |
|---|
| | 100 | MVChatRoomSecretMode = 1 << 1; |
|---|
| | 101 | MVChatRoomInviteOnlyMode = 1 << 2; |
|---|
| | 102 | MVChatRoomNormalUsersSilencedMode = 1 << 3; |
|---|
| | 103 | MVChatRoomOperatorsSilencedMode = 1 << 4; |
|---|
| | 104 | MVChatRoomOperatorsOnlySetTopicMode = 1 << 5; |
|---|
| | 105 | MVChatRoomNoOutsideMessagesMode = 1 << 6; |
|---|
| | 106 | MVChatRoomPassphraseToJoinMode = 1 << 7; |
|---|
| | 107 | MVChatRoomLimitNumberOfMembersMode = 1 << 8; |
|---|
| | 108 | |
|---|
| | 109 | MVChatRoomMemberNoModes = 0; |
|---|
| | 110 | MVChatRoomMemberQuietedMode = 1 << 0; |
|---|
| | 111 | MVChatRoomMemberVoicedMode = 1 << 1; |
|---|
| | 112 | MVChatRoomMemberHalfOperatorMode = 1 << 2; |
|---|
| | 113 | MVChatRoomMemberOperatorMode = 1 << 3; |
|---|
| | 114 | MVChatRoomMemberAdministratorMode = 1 << 4; |
|---|
| | 115 | MVChatRoomMemberFounderMode = 1 << 5; |
|---|
| | 116 | |
|---|
| | 117 | MVChatRemoteUserType = 'remT'.fourCharCode(); |
|---|
| | 118 | MVChatLocalUserType = 'locL'.fourCharCode(); |
|---|
| | 119 | MVChatWildcardUserType = 'wilD'.fourCharCode(); |
|---|
| | 120 | |
|---|
| | 121 | MVChatUserUnknownStatus = 'uKnw'.fourCharCode(); |
|---|
| | 122 | MVChatUserOfflineStatus = 'oflN'.fourCharCode(); |
|---|
| | 123 | MVChatUserDetachedStatus = 'detA'.fourCharCode(); |
|---|
| | 124 | MVChatUserAvailableStatus = 'avaL'.fourCharCode(); |
|---|
| | 125 | MVChatUserAwayStatus = 'awaY'.fourCharCode(); |
|---|
| | 126 | |
|---|
| | 127 | MVChatUserNoModes = 0; |
|---|
| | 128 | MVChatUserInvisibleMode = 1 << 0; |
|---|
| | 129 | |
|---|
| | 130 | MVFileTransferDoneStatus = 'trDn'.fourCharCode(); |
|---|
| | 131 | MVFileTransferNormalStatus = 'trNo'.fourCharCode(); |
|---|
| | 132 | MVFileTransferHoldingStatus = 'trHo'.fourCharCode(); |
|---|
| | 133 | MVFileTransferStoppedStatus = 'trSt'.fourCharCode(); |
|---|
| | 134 | MVFileTransferErrorStatus = 'trEr'.fourCharCode(); |
|---|
| | 135 | |
|---|
| | 136 | MVFileTransferConnectionError = -1; |
|---|
| | 137 | MVFileTransferFileCreationError = -2; |
|---|
| | 138 | MVFileTransferFileOpenError = -3; |
|---|
| | 139 | MVFileTransferAlreadyExistsError = -4; |
|---|
| | 140 | MVFileTransferUnexpectedlyEndedError = -5; |
|---|
| | 141 | MVFileTransferKeyAgreementError = -6; |
|---|
| | 142 | |
|---|