From 0a9f8f41ed08ee987cf04182f8098ecf1adedfb9 Mon Sep 17 00:00:00 2001 From: "False.Genesis" Date: Sun, 9 Dec 2007 22:14:10 +0000 Subject: [PATCH] * added DefScript macros @clock (ms since process start), @time (unix time) * time to release a new version! [A13.4 now done] --- src/Client/DefScript/DefScript.cpp | 12 ++++++++++++ src/Client/PseuWoW.cpp | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Client/DefScript/DefScript.cpp b/src/Client/DefScript/DefScript.cpp index b3a952c..92f767f 100644 --- a/src/Client/DefScript/DefScript.cpp +++ b/src/Client/DefScript/DefScript.cpp @@ -943,6 +943,18 @@ DefXChgResult DefScriptPackage::ReplaceVars(std::string str, CmdSet *pSet, unsig str=pSet->caller; else if(subs=="n") str="\n"; + else if(subs=="clock") + { + std::stringstream clock_s; + clock_s << clock(); + str = clock_s.str(); + } + else if(subs=="time") + { + std::stringstream time_s; + time_s << time(NULL); + str = time_s.str(); + } else if(variables.Exists(vname)) str=variables.Get(vname); else diff --git a/src/Client/PseuWoW.cpp b/src/Client/PseuWoW.cpp index d9e0a56..f76d6e4 100644 --- a/src/Client/PseuWoW.cpp +++ b/src/Client/PseuWoW.cpp @@ -46,8 +46,8 @@ void PseuInstanceRunnable::sleep(uint32 msecs) PseuInstance::PseuInstance(PseuInstanceRunnable *run) { _runnable=run; - _ver="PseuWoW Alpha Build 13.31" DEBUG_APPENDIX; - _ver_short="A13.31" DEBUG_APPENDIX; + _ver="PseuWoW Alpha Build 13.4" DEBUG_APPENDIX; + _ver_short="A13.4" DEBUG_APPENDIX; _wsession=NULL; _rsession=NULL; _scp=NULL; @@ -158,7 +158,7 @@ bool PseuInstance::Init(void) return false; } - log("Init complete.\n"); + log("Init complete."); _initialized=true; return true; }