aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-14 14:21:53 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-14 14:21:53 +0200
commit2e54a7e7c773615f8ff7dc2ef2b4ba8656ee8f4f (patch)
treecd5609bcf05d70f65d46c586b8e9ff75a2a1e8b1
parent67431b9f231719ddb7cb0dc3b749b002afe0280f (diff)
Revised CheckShoutQuota()
-rw-r--r--FICS/talkproc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/FICS/talkproc.c b/FICS/talkproc.c
index fdc3c24..a5fab0b 100644
--- a/FICS/talkproc.c
+++ b/FICS/talkproc.c
@@ -63,18 +63,18 @@
int quota_time;
-/* hawk: hacked it to fit ALL persons - quota list is not needed anymore */
-int CheckShoutQuota(int p)
+// hawk: hacked it to fit ALL persons - quota list is not needed anymore
+int
+CheckShoutQuota(int p)
{
- int timenow = time(0);
- int timeleft = 0;
-
- if (((timeleft = timenow - parray[p].lastshout_a) < quota_time) &&
- (parray[p].adminLevel == 0)) {
- return (quota_time - timeleft);
- } else {
- return 0;
- }
+ int timeleft = 0;
+ int timenow = time(0);
+
+ timeleft = timenow - parray[p].lastshout_a;
+
+ if (timeleft < quota_time && parray[p].adminLevel == 0)
+ return (quota_time - timeleft);
+ return 0;
}
PUBLIC int