summaryrefslogtreecommitdiff
path: root/stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'stat.c')
-rw-r--r--stat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stat.c b/stat.c
index 5f0a631..2c1323e 100644
--- a/stat.c
+++ b/stat.c
@@ -6,6 +6,7 @@
#include "log.h"
#include "tdutils.h"
#include "db.h"
+#include "botd.h"
#include <stdlib.h>
#include <string.h>
@@ -41,7 +42,9 @@ void stat(struct TdMessage *msg) {
if ((r = sqlite3_prepare_v2(db, "SELECT COUNT(t) FROM says;", -1, &stmt, NULL))) goto sql_err;
if ((r = sqlite3_step(stmt)) != SQLITE_ROW) goto sql_err;
size_t len = strlen(m);
- snprintf(&m[len], 1024 - len, "\n\n共有 %d 句教授语录。", sqlite3_column_int(stmt, 0));
+ snprintf(&m[len], 1024 - len, "\n\n共有 %d 句教授语录。\nBot 已运行 %ld 秒。",
+ sqlite3_column_int(stmt, 0),
+ time(NULL) - start_time);
sqlite3_finalize(stmt);
goto send;
send: