aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/shutdown.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-03-23 14:42:12 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-03-23 14:42:12 +0100
commitde3b618496f59801d3b5267d27ed04ec6b4f15ca (patch)
tree0bb775d44c3208b7b28ee75a83c3d6134391ff98 /FICS/shutdown.c
parent69efbb7a8633faea2f37eaad8639a68b6fd0bdf3 (diff)
Changed the type of 'lastTimeLeft', 'shutdownStartTime' and 'shutdownTime' to 'time_t'
Diffstat (limited to 'FICS/shutdown.c')
-rw-r--r--FICS/shutdown.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/FICS/shutdown.c b/FICS/shutdown.c
index 037b4ad..6e765ed 100644
--- a/FICS/shutdown.c
+++ b/FICS/shutdown.c
@@ -19,9 +19,9 @@
PRIVATE char downer[1024];
PRIVATE char reason[1024];
-PRIVATE int lastTimeLeft;
-PRIVATE int shutdownStartTime;
-PRIVATE int shutdownTime = 0;
+PRIVATE time_t lastTimeLeft;
+PRIVATE time_t shutdownStartTime;
+PRIVATE time_t shutdownTime = 0;
PUBLIC void
output_shut_mess(void)
@@ -167,7 +167,7 @@ com_shutdown(int p, param_list param)
ASSERT(parray[p].adminLevel >= ADMIN_ADMIN);
strlcpy(downer, parray[p].name, sizeof downer);
- shutdownStartTime = time(0);
+ shutdownStartTime = time(NULL);
if (shutdownTime) { // Cancel any pending shutdowns
for (p1 = 0; p1 < p_num; p1++) {
@@ -258,10 +258,10 @@ com_shutdown(int p, param_list param)
"%s. ****\n", reason);
}
- pprintf(p1, " **** Server going down in %d minutes and %d "
+ pprintf(p1, " **** Server going down in %ld minutes and %ld "
"seconds. ****\n",
- (shutdownTime / 60),
- (shutdownTime % 60));
+ (long int)(shutdownTime / 60),
+ (long int)(shutdownTime % 60));
if (p != p1) // fix double prompt - DAV
pprintf_prompt(p1, "\n");
else
@@ -291,10 +291,10 @@ server_shutdown(int secs, char *why)
continue;
pprintf(p1, "\n\n **** Automatic Server shutdown. ****\n");
pprintf(p1, "%s\n", why);
- pprintf_prompt(p1, " **** Server going down in %d minutes "
- "and %d seconds. ****\n\n",
- (shutdownTime / 60),
- shutdownTime - ((shutdownTime / 60) * 60));
+ pprintf_prompt(p1, " **** Server going down in %ld minutes "
+ "and %ld seconds. ****\n\n",
+ (long int)(shutdownTime / 60),
+ (long int)(shutdownTime - ((shutdownTime / 60) * 60)));
}
fprintf(stderr, "FICS: **** Automatic Server shutdown. ****\n");