diff options
| author | g8bpq <john.wiseman@cantab.net> | 2023-06-21 08:21:04 +0100 |
|---|---|---|
| committer | g8bpq <john.wiseman@cantab.net> | 2023-06-21 08:21:04 +0100 |
| commit | 75b5bcc9a97b38c6c0c210bf14fabad9cadf704a (patch) | |
| tree | 913d37a3946a40e9694833ed36fd5a8e02a23d42 /HanksRT.c | |
| parent | a21121fbfce48307740e6ade5f4f16531501b053 (diff) | |
6.0.23.7623.77
Diffstat (limited to 'HanksRT.c')
| -rw-r--r-- | HanksRT.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -135,10 +135,10 @@ int AddtoHistory(struct user_t * user, char * text) struct tm * tm;
time_t Now = time(NULL);
- // Don't want to grow indefinitely and fill memory. We only allow display upt 24 hours back, so if first record is older that that
+ // Don't want to grow indefinitely and fill memory. We only allow display up to 24 hours back, so if first record is older that that
// remove and reuse it
- if (History && History->Time < Now - 86400)
+ if (History && History->Time < Now - 86400)
{
Rec = History;
History = Rec->next; // Remove from front of chain
@@ -183,9 +183,6 @@ int AddtoHistory(struct user_t * user, char * text) -
-
-
int ChatIsUTF8(unsigned char *ptr, int len)
{
int n;
@@ -785,9 +782,7 @@ VOID ProcessChatLine(ChatCIRCUIT * conn, struct UserInfo * user, char* OrigBuffe int n = HistoryCount;
if (param)
- interval = atoi(param) * 60;
-
- start = time(NULL) - interval;
+ interval = atoi(param);
if (interval < 1)
{
@@ -802,6 +797,8 @@ VOID ProcessChatLine(ChatCIRCUIT * conn, struct UserInfo * user, char* OrigBuffe interval = 1440; // Limit to 1 day
}
+ start = time(NULL) - (interval * 60);
+
// Find first record to send
while (ptr)
|
