Index: MUSHclient.rc =================================================================== RCS file: /cvs/mushclient/MUSHclient.rc,v retrieving revision 1.221 retrieving revision 1.222 diff -c -r1.221 -r1.222 *** MUSHclient.rc 27 Jun 2008 21:35:50 -0000 1.221 --- MUSHclient.rc 3 Jul 2008 23:55:25 -0000 1.222 *************** *** 75,82 **** // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,30,0 ! PRODUCTVERSION 4,0,30,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L --- 75,82 ---- // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,31,0 ! PRODUCTVERSION 4,0,31,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L *************** *** 94,107 **** VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.30\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2008 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.30\0" VALUE "SpecialBuild", "\0" END END --- 94,107 ---- VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.31\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2008 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.31\0" VALUE "SpecialBuild", "\0" END END Index: OtherTypes.h =================================================================== RCS file: /cvs/mushclient/OtherTypes.h,v retrieving revision 1.75 retrieving revision 1.76 diff -c -r1.75 -r1.76 *** OtherTypes.h 25 Apr 2007 22:48:54 -0000 1.75 --- OtherTypes.h 6 Jul 2008 03:40:55 -0000 1.76 *************** *** 965,970 **** --- 965,971 ---- DISPID m_dispid_plugin_line_received; // "OnPluginLineReceived" DISPID m_dispid_plugin_packet_received; // "OnPluginPacketReceived" DISPID m_dispid_plugin_partial_line; // "OnPluginPartialLine" + DISPID m_dispid_plugin_telnet_option; // "OnPluginTelnetOption" DISPID m_dispid_plugin_OnMXP_Start; // "OnPluginMXPstart" DISPID m_dispid_plugin_OnMXP_Stop; // "OnPluginMXPstop" Index: doc.cpp =================================================================== RCS file: /cvs/mushclient/doc.cpp,v retrieving revision 1.232 retrieving revision 1.233 diff -c -r1.232 -r1.233 *** doc.cpp 29 Jun 2008 00:04:23 -0000 1.232 --- doc.cpp 6 Jul 2008 03:40:55 -0000 1.233 *************** *** 1803,1808 **** --- 1803,1809 ---- // an IAC as part of subnegotiation is OK if (!(m_phase == HAVE_SUBNEGOTIATION && c == IAC) && !(m_phase == HAVE_CHARSET && (c == IAC || c == m_charset_delimiter)) && + !(m_phase == HAVE_MUD_SPECIFIC && c == IAC) && !(m_phase == HAVE_CHARSET_REQUEST) ) m_phase = NONE; // cannot be in middle of escape sequence *************** *** 1840,1845 **** --- 1841,1847 ---- case HAVE_MXP: Phase_MXP (c); continue; case HAVE_CHARSET_REQUEST: Phase_CHARSET_REQUEST (c); continue; case HAVE_CHARSET: Phase_CHARSET (c); continue; + case HAVE_MUD_SPECIFIC: Phase_MUD_SPECIFIC (c); continue; case HAVE_COMPRESSION: { *************** *** 6839,6845 **** m_iNoteStyle = NORMAL; // back to default style m_bSent_WILL_SGA = false; m_bSent_WILL_TELOPT_TERMINAL_TYPE = false; ! m_bSent_WILL_TELOPT_ECHO = false; Note (""); // ensure connection starts on new line and that pixel offset doesn't chop message if (m_bShowConnectDisconnect) --- 6841,6851 ---- m_iNoteStyle = NORMAL; // back to default style m_bSent_WILL_SGA = false; m_bSent_WILL_TELOPT_TERMINAL_TYPE = false; ! m_bSent_WILL_TELOPT_ECHO = false; ! m_bSent_WILL_TELOPT_MUD_SPECIFIC = false; ! m_bOutgoing_MUD_specific = false; ! m_bIncoming_MUD_specific = false; ! m_strLast_MUD_specific_stuff_received.Empty (); Note (""); // ensure connection starts on new line and that pixel offset doesn't chop message if (m_bShowConnectDisconnect) Index: doc.h =================================================================== RCS file: /cvs/mushclient/doc.h,v retrieving revision 1.247 retrieving revision 1.249 diff -c -r1.247 -r1.249 *** doc.h 30 Jun 2008 03:50:50 -0000 1.247 --- doc.h 6 Jul 2008 03:40:55 -0000 1.249 *************** *** 21,28 **** // New versions - things to change ! #define THISVERSION 430 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.30"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT --- 21,28 ---- // New versions - things to change ! #define THISVERSION 431 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.31"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT *************** *** 97,102 **** --- 97,103 ---- HAVE_TERMINAL_TYPE, // in middle of subnegotiation for terminal type, awaiting SEND IAC SE HAVE_CHARSET_REQUEST, // in middle of subnegotiation for CHARSET, expecting delimiter character HAVE_CHARSET, // in middle of subnegotiation for CHARSET, expecting character set name + HAVE_MUD_SPECIFIC, // in middle of subnegotiation for MUD_SPECIFIC (102), expecting codes HAVE_FOREGROUND_256_START, // received ESC[38; HAVE_FOREGROUND_256_FINISH, // received ESC[38;5; HAVE_BACKGROUND_256_START, // received ESC[48; *************** *** 194,199 **** --- 195,201 ---- #define TELOPT_TERMINAL_TYPE 24 // want to know terminal type #define TELOPT_COMPRESS 85 // telet negotiation code for starting compression v1 #define TELOPT_COMPRESS2 86 // telet negotiation code for starting compression v2 + #define TELOPT_MUD_SPECIFIC 102 // telet negotiation code MUD-specific negotiations #define SUPPORT_VERSIONS 0 // MCCP support-versions query #define VERSION_IS 1 // MCCP version number #define VERSION_NONE 0 // see web page below for details *************** *** 951,956 **** --- 953,964 ---- // end MCCP stuff + // MUD-specific stuff + + bool m_bOutgoing_MUD_specific; // server said IAC DO 102 + bool m_bIncoming_MUD_specific; // server said IAC WILL 102 + CString m_strLast_MUD_specific_stuff_received; // last string x from MUD: IAC SB 102 x IAC SE + // MSP (MUD Sound Protocol) stuff bool m_bMSP; // true if using MSP *************** *** 1040,1045 **** --- 1048,1054 ---- bool m_bSent_WILL_SGA; bool m_bSent_WILL_TELOPT_TERMINAL_TYPE; bool m_bSent_WILL_TELOPT_ECHO; + bool m_bSent_WILL_TELOPT_MUD_SPECIFIC; // sockets stuff *************** *** 1237,1242 **** --- 1246,1252 ---- void Phase_MXP (const unsigned char c); void Phase_CHARSET_REQUEST (const unsigned char c); void Phase_CHARSET (const unsigned char c); + void Phase_MUD_SPECIFIC (const unsigned char c); // mxp collection phases void Phase_MXP_ELEMENT (const unsigned char c); Index: doc_construct.cpp =================================================================== RCS file: /cvs/mushclient/doc_construct.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -c -r1.30 -r1.31 *** doc_construct.cpp 29 Jun 2008 00:04:24 -0000 1.30 --- doc_construct.cpp 6 Jul 2008 03:40:55 -0000 1.31 *************** *** 51,56 **** --- 51,59 ---- m_nBytesOut = 0; m_bTabCompleteFunctions = true; + m_bOutgoing_MUD_specific = false; // server said IAC DO 102 + m_bIncoming_MUD_specific = false; // server said IAC WILL 102 + m_iTriggersEvaluatedCount = 0; m_iTriggersMatchedCount = 0; m_iAliasesEvaluatedCount = 0; Index: methods.cpp =================================================================== RCS file: /cvs/mushclient/methods.cpp,v retrieving revision 1.220 retrieving revision 1.221 diff -c -r1.220 -r1.221 *** methods.cpp 30 Jun 2008 03:50:50 -0000 1.220 --- methods.cpp 6 Jul 2008 03:40:55 -0000 1.221 *************** *** 4141,4146 **** --- 4141,4148 ---- { 72, "MUSHclient version" }, { 73, "MUSHclient compilation date/time" }, { 74, "Sounds directory" }, + { 75, "Last MUD-specific string received" }, + // (booleans - calculated at runtime) *************** *** 4159,4164 **** --- 4161,4169 ---- { 113, "World is active" }, { 114, "Output window paused" }, { 115, "Localization active" }, + { 116, "Outgoing MUD-specific codes requested" }, + { 117, "Incoming MUD-specific codes expected" }, + // (numbers (longs) - calculated at runtime) *************** *** 4404,4409 **** --- 4409,4415 ---- case 72: SetUpVariantString (vaResult, MUSHCLIENT_VERSION); break; case 73: SetUpVariantString (vaResult, __DATE__ " " __TIME__); break; case 74: SetUpVariantString (vaResult, ExtractDirectory (App.m_strMUSHclientFileName) + "sounds\\"); break; + case 75: SetUpVariantString (vaResult, m_strLast_MUD_specific_stuff_received); break; case 101: SetUpVariantBool (vaResult, m_bNoEcho); break; case 102: SetUpVariantBool (vaResult, m_bDebugIncomingPackets); break; *************** *** 4431,4436 **** --- 4437,4444 ---- break; case 115: SetUpVariantBool (vaResult, App.m_Translator_Lua != NULL); break; + case 116: SetUpVariantBool (vaResult, m_bOutgoing_MUD_specific); break; + case 117: SetUpVariantBool (vaResult, m_bIncoming_MUD_specific); break; case 201: SetUpVariantLong (vaResult, m_total_lines); break; case 202: SetUpVariantLong (vaResult, m_new_lines); break; Index: mushclient.clw =================================================================== RCS file: /cvs/mushclient/mushclient.clw,v retrieving revision 1.342 retrieving revision 1.343 diff -c -r1.342 -r1.343 *** mushclient.clw 23 Jun 2008 06:27:54 -0000 1.342 --- mushclient.clw 6 Jul 2008 03:40:55 -0000 1.343 *************** *** 2,8 **** [General Info] Version=1 ! LastClass=CMUSHclientDoc LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "mushclient.h" --- 2,8 ---- [General Info] Version=1 ! LastClass=CSendView LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "mushclient.h" Index: mushclient.hlp =================================================================== RCS file: /cvs/mushclient/mushclient.hlp,v retrieving revision 1.96 retrieving revision 1.97 diff -c -r1.96 -r1.97 Binary files /tmp/cvscK6H5g and /tmp/cvsDckAP5 differ Index: mushview.cpp =================================================================== RCS file: /cvs/mushclient/mushview.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -c -r1.92 -r1.93 *** mushview.cpp 30 Jun 2008 03:50:58 -0000 1.92 --- mushview.cpp 3 Jul 2008 23:55:25 -0000 1.93 *************** *** 3868,3874 **** RemoveToolTip (); GetClientRect (&r); - // if we can do a smooth scroll, well let's do it! if (abs (iDeltaY) < r.bottom) { --- 3868,3873 ---- *************** *** 3891,3897 **** } // end of smooth scrolling else { ! ScrollWindow (0, iDeltaY); m_scroll_position = pt; if (App.m_bSmootherScrolling) UpdateWindow (); // redraw immediately if wanted --- 3890,3896 ---- } // end of smooth scrolling else { ! Invalidate (); m_scroll_position = pt; if (App.m_bSmootherScrolling) UpdateWindow (); // redraw immediately if wanted Index: plugins.cpp =================================================================== RCS file: /cvs/mushclient/plugins.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -c -r1.42 -r1.43 *** plugins.cpp 12 Jun 2007 04:02:02 -0000 1.42 --- plugins.cpp 6 Jul 2008 03:41:06 -0000 1.43 *************** *** 49,55 **** m_dispid_plugin_sent = DISPID_UNKNOWN; m_dispid_plugin_line_received = DISPID_UNKNOWN; m_dispid_plugin_packet_received = DISPID_UNKNOWN; ! m_dispid_plugin_partial_line = DISPID_UNKNOWN; m_dispid_plugin_OnMXP_Start = DISPID_UNKNOWN; m_dispid_plugin_OnMXP_Stop = DISPID_UNKNOWN; --- 49,56 ---- m_dispid_plugin_sent = DISPID_UNKNOWN; m_dispid_plugin_line_received = DISPID_UNKNOWN; m_dispid_plugin_packet_received = DISPID_UNKNOWN; ! m_dispid_plugin_telnet_option = DISPID_UNKNOWN; ! m_dispid_plugin_partial_line = DISPID_UNKNOWN; m_dispid_plugin_OnMXP_Start = DISPID_UNKNOWN; m_dispid_plugin_OnMXP_Stop = DISPID_UNKNOWN; Index: stdafx.h =================================================================== RCS file: /cvs/mushclient/stdafx.h,v retrieving revision 1.107 retrieving revision 1.108 diff -c -r1.107 -r1.108 *** stdafx.h 27 Jun 2008 21:35:51 -0000 1.107 --- stdafx.h 6 Jul 2008 03:41:06 -0000 1.108 *************** *** 502,507 **** --- 502,508 ---- #define ON_PLUGIN_LINE_RECEIVED "OnPluginLineReceived" #define ON_PLUGIN_PACKET_RECEIVED "OnPluginPacketReceived" #define ON_PLUGIN_PARTIAL_LINE "OnPluginPartialLine" + #define ON_PLUGIN_TELNET_OPTION "OnPluginTelnetOption" // MXP stuff #define ON_PLUGIN_MXP_START "OnPluginMXPstart" Index: telnet_phases.cpp =================================================================== RCS file: /cvs/mushclient/telnet_phases.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** telnet_phases.cpp 11 Jun 2007 21:40:12 -0000 1.8 --- telnet_phases.cpp 6 Jul 2008 03:41:06 -0000 1.9 *************** *** 176,181 **** --- 176,190 ---- } break; // end of SGA + // here for TELOPT_MUD_SPECIFIC + case TELOPT_MUD_SPECIFIC: + { + unsigned char p [3] = { IAC, DO, c }; + SendPacket (p, sizeof p); + m_bIncoming_MUD_specific = true; + } + break; // end of TELOPT_MUD_SPECIFIC + case TELOPT_ECHO: if (!m_bNoEchoOff) { *************** *** 282,289 **** SendPacket (p, sizeof p); m_bSent_WILL_SGA = true; } ! break; // end of m_bSent_WILL_SGA case TELOPT_TERMINAL_TYPE: --- 291,308 ---- SendPacket (p, sizeof p); m_bSent_WILL_SGA = true; } ! break; // end of SGA + case TELOPT_MUD_SPECIFIC: + + if (!m_bSent_WILL_TELOPT_MUD_SPECIFIC) + { + unsigned char p [3] = { IAC, WILL, c }; + SendPacket (p, sizeof p); + m_bSent_WILL_TELOPT_MUD_SPECIFIC = true; + m_bOutgoing_MUD_specific = true; + } + break; // end of TELOPT_MUD_SPECIFIC case TELOPT_TERMINAL_TYPE: *************** *** 445,450 **** --- 464,475 ---- { TRACE1 ("<%d>", c); m_subnegotiation_type = c; // remember type of subnegotiation + + if (m_subnegotiation_type == TELOPT_MUD_SPECIFIC) + { + m_phase = HAVE_MUD_SPECIFIC; + m_strLast_MUD_specific_stuff_received.Empty (); + } } } // end of Phase_SUBNEGOTIATION *************** *** 508,513 **** --- 533,570 ---- m_phase = HAVE_CHARSET; // now we need the name m_charset_delimiter = c; m_charset_name.Empty (); // no name yet + } + + + void CMUSHclientDoc::Phase_MUD_SPECIFIC (const unsigned char c) + { + if (c == IAC || // IAC terminates + c == 0 || // can't handle NUL + m_strLast_MUD_specific_stuff_received.GetLength () > 127) // bail out at 127 characters + { + m_phase = HAVE_IAC; + + // tell each plugin what we have received + for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; ) + { + CPlugin * pPlugin = m_PluginList.GetNext (pluginpos); + + + if (!(pPlugin->m_bEnabled)) // ignore disabled plugins + continue; + + CString strReceived (m_strLast_MUD_specific_stuff_received); + + // see what the plugin makes of this, + pPlugin->ExecutePluginScript (ON_PLUGIN_TELNET_OPTION, + strReceived, // what we got + pPlugin->m_dispid_plugin_telnet_option); + + } // end of doing each plugin + return; + } + + m_strLast_MUD_specific_stuff_received += c; } Index: xml_load_world.cpp =================================================================== RCS file: /cvs/mushclient/xml_load_world.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -c -r1.92 -r1.93 *** xml_load_world.cpp 29 Jun 2008 00:04:24 -0000 1.92 --- xml_load_world.cpp 6 Jul 2008 03:41:06 -0000 1.93 *************** *** 456,461 **** --- 456,463 ---- = m_CurrentPlugin->GetPluginDispid (ON_PLUGIN_PACKET_RECEIVED); m_CurrentPlugin->m_dispid_plugin_partial_line = m_CurrentPlugin->GetPluginDispid (ON_PLUGIN_PARTIAL_LINE); + m_CurrentPlugin->m_dispid_plugin_telnet_option + = m_CurrentPlugin->GetPluginDispid (ON_PLUGIN_TELNET_OPTION); m_CurrentPlugin->m_dispid_plugin_OnMXP_Start = m_CurrentPlugin->GetPluginDispid (ON_PLUGIN_MXP_START ); Index: install/readme.txt =================================================================== RCS file: /cvs/mushclient/install/readme.txt,v retrieving revision 1.172 retrieving revision 1.174 diff -c -r1.172 -r1.174 *** install/readme.txt 30 Jun 2008 03:50:58 -0000 1.172 --- install/readme.txt 6 Jul 2008 03:41:06 -0000 1.174 *************** *** 1,7 **** ! MUSHclient version 4.30 ======================= ! Monday, 30th June 2008 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/ --- 1,7 ---- ! MUSHclient version 4.31 ======================= ! Sunday, 6th July 2008 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/