aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/variable.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-01 22:02:29 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-01 22:02:29 +0200
commita8d9674d3d0de1287107ebdc60e17f766693cd77 (patch)
tree1853678f03c58c7af6fb41432412308b035f84cb /FICS/variable.c
parentebe32d462668e61fe65678ad1818ca3963f54416 (diff)
Reformatted functions
Diffstat (limited to 'FICS/variable.c')
-rw-r--r--FICS/variable.c55
1 files changed, 30 insertions, 25 deletions
diff --git a/FICS/variable.c b/FICS/variable.c
index 27edb18..0f74d72 100644
--- a/FICS/variable.c
+++ b/FICS/variable.c
@@ -71,36 +71,41 @@ PRIVATE int set_boolean_var(int *var, char *val)
return (-1);
}
-PRIVATE int set_open(int p, char *var, char *val)
-{
- int v = set_boolean_var(&parray[p].open, val);
-
- if (v < 0)
- return VAR_BADVAL;
- if (v > 0)
- pprintf(p, "You are now open to receive match requests.\n");
- else {
- player_decline_offers(p, -1, PEND_MATCH);
- player_withdraw_offers(p, -1, PEND_MATCH);
- pprintf(p, "You are no longer receiving match requests.\n");
- }
- return VAR_OK;
+PRIVATE int
+set_open(int p, char *var, char *val)
+{
+ int v = set_boolean_var(&parray[p].open, val);
+
+ if (v < 0) {
+ return VAR_BADVAL;
+ } else if (v > 0) {
+ pprintf(p, "You are now open to receive match requests.\n");
+ } else {
+ player_decline_offers(p, -1, PEND_MATCH);
+ player_withdraw_offers(p, -1, PEND_MATCH);
+ pprintf(p, "You are no longer receiving match requests.\n");
+ }
+
+ return VAR_OK;
}
-PRIVATE int set_sopen(int p, char *var, char *val)
+PRIVATE int
+set_sopen(int p, char *var, char *val)
{
- int v = set_boolean_var(&parray[p].sopen, val);
+ int v = set_boolean_var(&parray[p].sopen, val);
- if (v < 0)
- return VAR_BADVAL;
- pprintf(p, "sopen set to %d.\n", parray[p].sopen);
+ if (v < 0)
+ return VAR_BADVAL;
- if (v > 0)
- pprintf(p, "You are now open to receive simul requests.\n");
- else
- pprintf(p, "You are no longer receiving simul requests.\n");
- player_decline_offers(p, -1, PEND_SIMUL);
- return VAR_OK;
+ pprintf(p, "sopen set to %d.\n", parray[p].sopen);
+
+ if (v > 0)
+ pprintf(p, "You are now open to receive simul requests.\n");
+ else
+ pprintf(p, "You are no longer receiving simul requests.\n");
+
+ player_decline_offers(p, -1, PEND_SIMUL);
+ return VAR_OK;
}
PRIVATE int