From 9bf7f856804aca90cfb285e1e94ba16b7d42bf2d Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Thu, 9 May 2024 20:42:12 +0200 Subject: Reformatted SetRating() --- FICS/adminproc.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'FICS') 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); - } } /* -- cgit v1.2.3