aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/matchproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/matchproc.c')
-rw-r--r--FICS/matchproc.c66
1 files changed, 36 insertions, 30 deletions
diff --git a/FICS/matchproc.c b/FICS/matchproc.c
index 8523df9..d53f433 100644
--- a/FICS/matchproc.c
+++ b/FICS/matchproc.c
@@ -984,37 +984,43 @@ PUBLIC int com_accept(int p, param_list param)
return COM_OK_NOPROMPT;
}
-int WordToOffer (int p, char *Word, int *type, int *p1)
+PRIVATE int
+WordToOffer(int p, char *Word, int *type, int *p1)
{
- /* Convert draw adjourn match takeback abort pause
- simmatch switch partner or <name> to offer type. */
- if (!strcmp(Word, "match")) {
- *type = PEND_MATCH;
- } else if (!strcmp(Word, "draw")) {
- *type = PEND_DRAW;
- } else if (!strcmp(Word, "pause")) {
- *type = PEND_PAUSE;
- } else if (!strcmp(Word, "abort")) {
- *type = PEND_ABORT;
- } else if (!strcmp(Word, "takeback")) {
- *type = PEND_TAKEBACK;
- } else if (!strcmp(Word, "adjourn")) {
- *type = PEND_ADJOURN;
- } else if (!strcmp(Word, "switch")) {
- *type = PEND_SWITCH;
- } else if (!strcmp(Word, "simul")) {
- *type = PEND_SIMUL;
- } else if (!strcmp(Word, "partner")) {
- *type = PEND_PARTNER;
- } else if (!strcmp(Word, "all")) {
- } else {
- *p1 = player_find_part_login(Word);
- if (*p1 < 0) {
- pprintf(p, "No user named \"%s\" is logged in.\n", Word);
- return 0;
- }
- }
- return 1;
+ /*
+ * Convert draw adjourn match takeback abort pause simmatch
+ * switch partner or <name> to offer type.
+ */
+
+ if (!strcmp(Word, "match")) {
+ *type = PEND_MATCH;
+ } else if (!strcmp(Word, "draw")) {
+ *type = PEND_DRAW;
+ } else if (!strcmp(Word, "pause")) {
+ *type = PEND_PAUSE;
+ } else if (!strcmp(Word, "abort")) {
+ *type = PEND_ABORT;
+ } else if (!strcmp(Word, "takeback")) {
+ *type = PEND_TAKEBACK;
+ } else if (!strcmp(Word, "adjourn")) {
+ *type = PEND_ADJOURN;
+ } else if (!strcmp(Word, "switch")) {
+ *type = PEND_SWITCH;
+ } else if (!strcmp(Word, "simul")) {
+ *type = PEND_SIMUL;
+ } else if (!strcmp(Word, "partner")) {
+ *type = PEND_PARTNER;
+ } else if (!strcmp(Word, "all")) {
+ ;
+ } else {
+ if ((*p1 = player_find_part_login(Word)) < 0) {
+ pprintf(p, "No user named \"%s\" is logged in.\n",
+ Word);
+ return 0;
+ }
+ }
+
+ return 1;
}
PUBLIC int