From 704be96b4c25fa4566da22940f436eadc43679a1 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 1 Jan 2009 19:32:44 -0600 Subject: *Add console command "difftime" to change the interval to record diff time in log. --HG-- branch : trunk --- src/trinitycore/CliRunnable.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/trinitycore/CliRunnable.cpp') diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp index 7fe2ab784a6..78c6e0dbb85 100644 --- a/src/trinitycore/CliRunnable.cpp +++ b/src/trinitycore/CliRunnable.cpp @@ -272,6 +272,26 @@ bool ChatHandler::HandleServerSetLogLevelCommand(const char *args) return true; } +/// set diff time record interval +bool ChatHandler::HandleServerSetDiffTimeCommand(const char *args) +{ + if(!*args) + return false; + + char *NewTimeStr = strtok((char*)args, " "); + if(!NewTimeStr) + return false; + + int32 NewTime =atoi(NewTimeStr); + if(NewTime < 0) + return false; + + sWorld.SetRecordDiffInterval(NewTime); + printf( "Record diff every %u ms\n", NewTime); + return true; +} + + /// @} #ifdef linux -- cgit v1.2.3