Posted by
| halkeye
Canada (28 posts) Bio
|
Message
| I've been trying to get the mud to autodetected MCCP. But unfortuatly with the exception of mcclient, and occasionally zmud, I am unable to detect mccp at all.
I've been using the code listed both here and at http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1110 and still being unable exactly to get things detected.
For the most part, i'm using the smaug-1.4 patch on randomly.org:
for (p = d->inbuf; *p; p++)
{
if (*p == IAC)
{
if (memcmp (p, will_termtype_str, strlen(will_termtype_str)) == 0)
{
memmove (p, &p [strlen (will_termtype_str)], strlen (&p [strlen (will_termtype_str)]) + 1);
p--;
write_to_buffer(d, req_termtype_str, 0);
} else if (memcmp (p, wont_termtype_str, strlen(wont_termtype_str)) == 0) {
memmove (p, &p [strlen (wont_termtype_str)], strlen (&p [strlen (wont_termtype_str)]) + 1);
p--;
#ifdef MCCP
} else if (memcmp (p, do_compress1_str, strlen(do_compress1_str)) == 0) {
compressStart(d, TELOPT_COMPRESS);
memmove (p, &p [strlen (do_compress1_str)], strlen(&p[strlen(do_compress1_str)] + 1));
p--;
} else if (memcmp (p, dont_compress1_str, strlen(dont_compress1_str)) == 0) {
compressEnd(d);
memmove (p, &p [strlen (dont_compress1_str)], strlen(&p[strlen(do_compress1_str)] + 1));
p--;
} else if (memcmp (p, do_compress2_str, strlen(do_compress2_str)) == 0) {
compressStart(d, TELOPT_COMPRESS2);
memmove (p, &p [strlen (do_compress2_str)], strlen(&p[strlen(do_compress2_str)] + 1));
p--;
} else if (memcmp (p, dont_compress2_str, strlen(dont_compress2_str)) == 0 && compress == FALSE) {
compressEnd(d);
memmove (p, &p [strlen (dont_compress2_str)], strlen(&p[strlen(do_compress2_str)] + 1));
p--;
#endif
There are more lines of course, mainly todo with client detection.
I've been testing with MUSHclient 3.42.
For the retrofit, i've been looking at http://www.gammon.com.au/mushclient/addingservermxp.htm and using mccp stuff instead (mxp is another project i'd like todo something, but mccp is what i started first).
I tried putting in debug lines, I havn't actually tried a packet filter, but it looks like i get a DO COMPRESS2 then a DONT COMPRESS, thus killing off the compression. I've tried taking this into account, but it still doesn't seem to turn it on.
Can you give me any hints at all?
- Gavin |
Gavin
Dark Warriors - Coder
http://darkwars.wolfpaw.net
telnet://darkwars.wolfpaw.net:4848 | Top |
|