aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-01-03 23:18:04 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-01-03 23:18:04 +0100
commit4ad609603226b2d934a59e37ea7fc10be6884344 (patch)
treea6376acd4d4f8747983092d172bb00594cef1bf9
parentee2505ddaa4e2d056f9532a1b550dac14b67c02f (diff)
Reformatted com_set()
-rw-r--r--FICS/comproc.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c
index 425b08b..bdbfb56 100644
--- a/FICS/comproc.c
+++ b/FICS/comproc.c
@@ -252,32 +252,36 @@ PUBLIC int com_quit(int p, param_list param)
return COM_LOGOUT;
}
-PUBLIC int com_set(int p, param_list param)
+PUBLIC int
+com_set(int p, param_list param)
{
- int result;
- int which;
- char *val;
-
- if (param[1].type == TYPE_NULL)
- val = NULL;
- else
- val = param[1].val.string;
- result = var_set(p, param[0].val.word, val, &which);
- switch (result) {
- case VAR_OK:
- break;
- case VAR_BADVAL:
- pprintf(p, "Bad value given for variable %s.\n", param[0].val.word);
- break;
- case VAR_NOSUCH:
- pprintf(p, "No such variable name %s.\n", param[0].val.word);
- break;
- case VAR_AMBIGUOUS:
- pprintf(p, "Ambiguous variable name %s.\n", param[0].val.word);
- break;
- }
- /* player_save(p); */
- return COM_OK;
+ char *val;
+ int result;
+ int which;
+
+ if (param[1].type == TYPE_NULL)
+ val = NULL;
+ else
+ val = param[1].val.string;
+
+ result = var_set(p, param[0].val.word, val, &which);
+
+ switch (result) {
+ case VAR_OK:
+ break;
+ case VAR_BADVAL:
+ pprintf(p, "Bad value given for variable %s.\n",
+ param[0].val.word);
+ break;
+ case VAR_NOSUCH:
+ pprintf(p, "No such variable name %s.\n", param[0].val.word);
+ break;
+ case VAR_AMBIGUOUS:
+ pprintf(p, "Ambiguous variable name %s.\n", param[0].val.word);
+ break;
+ }
+
+ return COM_OK;
}
PUBLIC int