afflux/pure-python-otr — pull request #19 by mmb (2012-05-14 05:25:57+00:00)
Title: Add maxMessageSize() method so it can be overridden in Context subclasses.

This change will let Context subclasses calculate max message size per
context, and possibly even per message based on appdata.

The driver for this is IRC, where the amount of space allowed for the OTR
message depends on the length of the destination nick. The IRC message
would look like:

PRIVMSG mmb :?OTR:...

Instead of hardcoding a low MMS that accounts for the longest possible
nick a method would allow the context to take the destination nick into account
when calculating MMS.