const char *memoserv_module_deps[] = { NULL };
static struct module *memoserv_module;
static struct log_type *MS_LOG;
-static unsigned long memosSent, memosExpired;
+static unsigned long memoCount;
+static unsigned long memosSent;
+static unsigned long memosExpired;
static struct dict *memos; /* memo_account->handle->handle -> memo_account */
static struct memo_account *
memoList_remove(&memo->sender->sent, memo);
free(memo->message);
free(memo);
+ memoCount--;
}
static void
memo->sent = sent;
memo->message = strdup(message);
memosSent++;
+ memoCount++;
return memo;
}
static MODCMD_FUNC(cmd_status)
{
- reply("MSMSG_STATUS_TOTAL", dict_size(memos));
+ reply("MSMSG_STATUS_TOTAL", memoCount);
reply("MSMSG_STATUS_EXPIRED", memosExpired);
reply("MSMSG_STATUS_SENT", memosSent);
return 1;