]> git.stg.codes - stg.git/blobdiff - include/stg_message.h
Fix user deletion in XML-RPC API
[stg.git] / include / stg_message.h
index 156e17317a149ea980e997ff815d427f892fad36..16fe566f662ef8b833c2df13d5a54132f29fc5e8 100644 (file)
  $Date: 2010/03/04 11:49:52 $
  */
 
-#include <time.h>
+#include <ctime>
 #include <string>
 
-using namespace std;
+#include "os_int.h"
+
 //-----------------------------------------------------------------------------
 struct STG_MSG_HDR
 {
@@ -40,15 +41,16 @@ unsigned    repeatPeriod;
 //-----------------------------------------------------------------------------
 struct STG_MSG
 {
-STG_MSG()
-    : header(),
-      text()
-{};
+STG_MSG() {};
+
+time_t GetNextSendTime() const
+{
+return header.lastSendTime + header.repeat * 60;
+};
 
 STG_MSG_HDR header;
-string      text;
+std::string text;
 };
 //-----------------------------------------------------------------------------
 
 #endif
-