libpurple/protocols/yahoo/yahoo.h

changeset 24623
cc86f44f12d0
parent 24334
63714c02b0fd
child 25760
7c082351dfc4
child 26368
d6d207874936
--- a/libpurple/protocols/yahoo/yahoo.h	Thu Nov 13 08:26:12 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo.h	Thu Nov 13 08:39:44 2008 +0000
@@ -182,6 +182,21 @@
 
 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255)
 
+/*
+ * Current Maximum Length for Instant Messages
+ *
+ * This was found by experiment.
+ *
+ * The YMSG protocol allows a message of up to 948 bytes, but the official client
+ * limits to 800 characters.  According to experiments I conducted, it seems that
+ * the discrepancy is to allow some leeway for messages with mixed single- and
+ * multi-byte characters, as I was able to send messages of 840 and 932 bytes
+ * by using some multibyte characters (some random Chinese or Japanese characters,
+ * to be precise). - rekkanoryo
+ */
+#define YAHOO_MAX_MESSAGE_LENGTH_BYTES 948
+#define YAHOO_MAX_MESSAGE_LENGTH_CHARS 800
+
 /* sometimes i wish prpls could #include things from other prpls. then i could just
  * use the routines from libfaim and not have to admit to knowing how they work. */
 #define yahoo_put16(buf, data) ( \

mercurial