Skip to content

Commit

Permalink
Added GetInfo (306) - when the world started up
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Sep 9, 2010
1 parent 1da3306 commit baa6353
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc.h
Expand Up @@ -976,6 +976,8 @@ class CMUSHclientDoc : public CDocument
CTime m_tConnectTime; // time we connected to the world
CTime m_tLastPlayerInput; // time the player last typed something (for <afk> )
CTimeSpan m_tsConnectDuration; // timespan we have been connected
CTime m_whenWorldStarted; // when world document started


CTime m_tStatusTime; // time of line that mouse was over
CPoint m_lastMousePosition; // where mouse last was over the world window
Expand Down
2 changes: 2 additions & 0 deletions doc_construct.cpp
Expand Up @@ -25,6 +25,8 @@ int i;
// each document will have a unique number
m_iUniqueDocumentNumber = App.GetUniqueNumber ();

m_whenWorldStarted = CTime::GetCurrentTime();

AllocateConfigurationArrays ();

m_bTrace = false; // not tracing yet
Expand Down
4 changes: 4 additions & 0 deletions scripting/methods.cpp
Expand Up @@ -4313,6 +4313,7 @@ tInfoTypeMapping InfoTypes [] =
{ 303, "When script file was last modified" },
{ 304, "Time now" },
{ 305, "When client started executing" },
{ 306, "When this world was created/opened" },


{ 0, "" }, // end of table marker
Expand Down Expand Up @@ -5060,6 +5061,9 @@ VARIANT CMUSHclientDoc::GetInfo(long InfoType)
SetUpVariantDate (vaResult, COleDateTime (App.m_whenClientStarted.GetTime ()));
break;

case 306:
SetUpVariantDate (vaResult, COleDateTime (m_whenWorldStarted.GetTime ()));
break;

default:
vaResult.vt = VT_NULL;
Expand Down

0 comments on commit baa6353

Please sign in to comment.