diff --git a/doc.h b/doc.h index 85af44cf..9c0cd0b1 100644 --- a/doc.h +++ b/doc.h @@ -946,6 +946,7 @@ class CMUSHclientDoc : public CDocument long m_new_lines; // lines they haven't read yet (if not active view) long m_nTotalLinesSent; // lines sent this connection long m_nTotalLinesReceived; // lines they received this connection + long m_last_line_with_IAC_GA; CTime m_tConnectTime; // time we connected to the world CTime m_tLastPlayerInput; // time the player last typed something (for ) diff --git a/doc_construct.cpp b/doc_construct.cpp index 483300c9..4d4bb0bc 100644 --- a/doc_construct.cpp +++ b/doc_construct.cpp @@ -192,6 +192,7 @@ int i; m_InputFontHeight = 0; m_InputFontWidth = 0; m_total_lines = 0; + m_last_line_with_IAC_GA = 0; m_nTotalLinesSent = 0; m_nTotalLinesReceived = 0; m_phase = NONE; diff --git a/scripting/methods.cpp b/scripting/methods.cpp index 188691ef..956b9c5d 100644 --- a/scripting/methods.cpp +++ b/scripting/methods.cpp @@ -4265,7 +4265,9 @@ tInfoTypeMapping InfoTypes [] = { 285, "Output window available" }, { 286, "Triggers matched this session" }, { 287, "Aliases matched this session" }, -{ 288, "Timers fired this session" }, +{ 288, "Timers fired this session" }, +{ 289, "Last line with IAC/GA or IAC/EOR in it" }, + // (dates - calculated at runtime) @@ -4881,7 +4883,7 @@ VARIANT CMUSHclientDoc::GetInfo(long InfoType) case 286: SetUpVariantLong (vaResult, m_iTriggersMatchedThisSessionCount); break; // Triggers matched this session case 287: SetUpVariantLong (vaResult, m_iAliasesMatchedThisSessionCount); break; // Aliases matched this session case 288: SetUpVariantLong (vaResult, m_iTimersFiredThisSessionCount); break; // Timers fired this session - + case 289: SetUpVariantLong (vaResult, m_last_line_with_IAC_GA); break; // Last line number that had an IAC/GA in it case 301: diff --git a/telnet_phases.cpp b/telnet_phases.cpp index 60811264..aef4c352 100644 --- a/telnet_phases.cpp +++ b/telnet_phases.cpp @@ -123,6 +123,7 @@ void CMUSHclientDoc::Phase_IAC (unsigned char & c) p = "EOR"; if (m_bConvertGAtoNewline) new_c = '\n'; + m_last_line_with_IAC_GA = m_total_lines; Handle_IAC_GA (); break; case GO_AHEAD : @@ -130,6 +131,7 @@ void CMUSHclientDoc::Phase_IAC (unsigned char & c) p = "GA"; if (m_bConvertGAtoNewline) new_c = '\n'; + m_last_line_with_IAC_GA = m_total_lines; Handle_IAC_GA (); break;