aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/adminproc.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-05-09 20:42:12 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-05-09 20:42:12 +0200
commit9bf7f856804aca90cfb285e1e94ba16b7d42bf2d (patch)
tree4d0ab8cf93e9978e0e357aff318bfad64a78f6ef /FICS/adminproc.c
parent666df0c1b0b8c978e86d69042efd6c70ddc703af (diff)
Reformatted SetRating()
Diffstat (limited to 'FICS/adminproc.c')
-rw-r--r--FICS/adminproc.c48
1 files changed, 26 insertions, 22 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c
index 1b8eb13..7081cad 100644
--- a/FICS/adminproc.c
+++ b/FICS/adminproc.c
@@ -1474,30 +1474,34 @@ PUBLIC int com_asetadmin(int p, param_list param)
return COM_OK;
}
-PRIVATE void SetRating(int p1, param_list param, statistics *s)
+PRIVATE void
+SetRating(int p1, param_list param, statistics *s)
{
- s->rating = param[1].val.integer;
- if (s->ltime == 0L)
- s->sterr = 70.0;
-
- if (param[2].type == TYPE_INT) {
- s->win = param[2].val.integer;
- if (param[3].type == TYPE_INT) {
- s->los = param[3].val.integer;
- if (param[4].type == TYPE_INT) {
- s->dra = param[4].val.integer;
- if (param[5].type == TYPE_INT) {
- s->sterr = (double) param[5].val.integer;
+ s->rating = param[1].val.integer;
+
+ if (s->ltime == 0L)
+ s->sterr = 70.0;
+
+ if (param[2].type == TYPE_INT) {
+ s->win = param[2].val.integer;
+ if (param[3].type == TYPE_INT) {
+ s->los = param[3].val.integer;
+ if (param[4].type == TYPE_INT) {
+ s->dra = param[4].val.integer;
+ if (param[5].type == TYPE_INT) {
+ s->sterr = (double) param[5].val.integer;
+ }
+ }
+ }
+ }
+
+ s->num = s->win + s->los + s->dra;
+
+ if (s->num == 0) {
+ s->ltime = 0L;
+ } else {
+ s->ltime = time(0);
}
- }
- }
- }
- s->num = s->win + s->los + s->dra;
- if (s->num == 0) {
- s->ltime = 0L;
- } else {
- s->ltime = time(0);
- }
}
/*