On Tue, Sep 10, 2013 at 11:29:00PM +0200, Thijs Alkemade wrote: > > On 10 sep. 2013, at 22:57, Kurt Roeckx <[email protected]> wrote: > > > If think you always want to have the whole PRIVMSG (and NOTICE) > > encrypted, regardless if it's a CTCP or not. So that would be: > > PRIVMSG nick :?OTR...\r\n > > > > What I'm confused about is why this would require Pidgin-OTR to > > parse anything. But then I have no idea which signals pidgin has. > > What you want is that you can replace the part between the : and > > the \r\n. Does an irc-receiving-text catch the whole message > > including the PRIVMSG? Is there a way to only do this for > > the text part of the PRIVSG? > > Pidgin's IRC prpl uses two sets of signals currently: > > "sending-im-msg"/"receiving-im-msg": These are emitted only for actual IMs, so > not for any form of CTCPs. For most plugins that makes sense, you don't want > a pop-up notification for every CTCP PING you get. > > "irc-sending-text"/"irc-receiving-text": These are emitted with a buffer of > the raw protocol data about to be sent/just received. I think this is always > exactly 1 line, but I'm not sure if that is guaranteed.
Looking at this purely from a protocol level, 1 PRIVMSG can contain both CTCP and non-CTCP parts, or even multple CTCP messages. For instance on receiving this: :nick1 PRIVMSG nick2 :\001ACTION foo\001bar\r\n It should show something like: * nick1 foo <nick1> bar (I have no idea if pidgin gets this right or not.) So you either want to encrypt the whole part between the : and the \r\n, or you need to encrypt the individual parts. It makes most sense to me to just encrypt the whole message. Assuming you want to go with the whole message encryption, I see 2 solutions: - pidgin first parses the message and then provides a way to do the decryption of PRIVMSG/NOTICE where just the part after the ':' can be modified. Also just before sending it it allows you to modify whatever comes after the ':' to do the encryption. - piding-otr does this for the whole line on send and receive and needs to be able the parse irc messages. Kurt _______________________________________________ OTR-dev mailing list [email protected] http://lists.cypherpunks.ca/mailman/listinfo/otr-dev
