errorMessage=AILocalizedStringFromTableInBundle(@"An error occured while encrypting a message",nil,[NSBundlebundleForClass:[AdiumOTREncryptionclass]],nil);
break;
caseOTRL_ERRCODE_MSG_NOT_IN_PRIVATE:
errorMessage=AILocalizedStringFromTableInBundle(@"Sent encrypted message to somebody who is not in a mutual OTR session",nil,[NSBundlebundleForClass:[AdiumOTREncryptionclass]],nil);
break;
caseOTRL_ERRCODE_MSG_UNREADABLE:
errorMessage=AILocalizedStringFromTableInBundle(@"Sent an unreadable encrypted message",nil,[NSBundlebundleForClass:[AdiumOTREncryptionclass]],nil);
break;
caseOTRL_ERRCODE_MSG_MALFORMED:
errorMessage=AILocalizedStringFromTableInBundle(@"Message sent is malformed",nil,[NSBundlebundleForClass:[AdiumOTREncryptionclass]],nil);
constchar*prefix_str=strdup([AILocalizedStringFromTableInBundle(@"[resent]",@"Prefix used by OTR for resent messages",[NSBundlebundleForClass:[AdiumOTREncryptionclass]],nil)UTF8String]);
returnprefix_str;
}
/* Free the string allocated by resent_msg_prefix_cb. */
AILogWithSignature(@"Received an OTR message for a different instance. We will silently ignore it: %s",message);
break;
caseOTRL_MSGEVENT_LOG_HEARTBEAT_RCVD:
caseOTRL_MSGEVENT_LOG_HEARTBEAT_SENT:
AILogWithSignature(@"I'm still alive");
break;
caseOTRL_MSGEVENT_RCVDMSG_UNRECOGNIZED:
caseOTRL_MSGEVENT_RCVDMSG_MALFORMED:
caseOTRL_MSGEVENT_RCVDMSG_NOT_IN_PRIVATE:
caseOTRL_MSGEVENT_RCVDMSG_UNREADABLE:{
NSString*localizedMessage=[NSStringstringWithFormat:AILocalizedStringFromTableInBundle(@"An encrypted message from %@ could not be decrypted.",@"libotr error message",[NSBundlebundleForClass:[AdiumOTREncryptionclass]],nil),listContact.UID];
NSString*localizedMessage=[NSStringstringWithFormat:AILocalizedStringFromTableInBundle(@"Your message was not sent. %@ is no longer using encryption; you should cancel or refresh encryption on your side.",
[adium.contentControllerdisplayEvent:[NSStringstringWithFormat:AILocalizedStringFromTableInBundle(@"%@ has sent you a secret question and is awaiting your answer to verify your identity.",nil,
[adium.contentControllerdisplayEvent:[NSStringstringWithFormat:AILocalizedStringFromTableInBundle(@"%@ has requested to compare your shared secret to verify your identity.",nil,
NSString*localizedMessage=AILocalizedStringFromTableInBundle(@"The secret question was <b>not</b> answered correctly. You might be talking to an imposter.",
AILogWithSignature(@"Something's wrong: %p != %p. Did the conversation close before you sent the secret question?",context,contextForChat(inChat));
return;
}
otrl_message_initiate_smp_q(otrg_get_userstate(),
&ui_ops,NULL,context,
(constchar*)[questionUTF8String],
[answerbytes],
[answerlength]);
[adium.contentControllerdisplayEvent:[NSStringstringWithFormat:AILocalizedString(@"You have asked %@ a secret question to verify their identity. Awaiting answer...",nil),inChat.listObject.displayName]
AILogWithSignature(@"Something's wrong: %p != %p. Did the conversation close before you sent the secret question?",context,contextForChat(inChat));
return;
}
otrl_message_initiate_smp(otrg_get_userstate(),
&ui_ops,NULL,
context,
[answerbytes],
[answerlength]);
[adium.contentControllerdisplayEvent:[NSStringstringWithFormat:AILocalizedString(@"You have asked %@ to compare your shared secret to verify their identity. Awaiting answer...",nil),inChat.listObject.displayName]
ofType:@"encryption"
inChat:inChat];
}
isInitiator:TRUE];
[windowControllershowWindow:nil];
[windowController.windoworderFront:nil];
}
/*!
* @brief Adium will begin terminating
*
* Send the OTRL_TLV_DISCONNECTED packets when we're about to quit before we disconnect
AILocalizedString(@"Secure ID for this session:",nil),
AILocalizedString(@"Incoming:","This is shown before the Off-the-Record Session ID (a series of numbers and letters) sent by the other party with whom you are having an encrypted chat."),
AILocalizedString(@"Outgoing:","This is shown before the Off-the-Record Session ID (a series of numbers and letters) sent by you to the other party with whom you are having an encrypted chat."),