Skip to content

Commit

Permalink
Added selector 289 to GetInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Feb 25, 2010
1 parent ff39f81 commit 006ac57
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc.h
Expand Up @@ -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 <afk> )
Expand Down
1 change: 1 addition & 0 deletions doc_construct.cpp
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions scripting/methods.cpp
Expand Up @@ -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)

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions telnet_phases.cpp
Expand Up @@ -123,13 +123,15 @@ 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 :
m_phase = NONE;
p = "GA";
if (m_bConvertGAtoNewline)
new_c = '\n';
m_last_line_with_IAC_GA = m_total_lines;
Handle_IAC_GA ();
break;

Expand Down

0 comments on commit 006ac57

Please sign in to comment.