aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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