From b9e45db91dd14087d945b96c10c302c830b8e23c Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 1 Apr 2024 18:57:29 +0200 Subject: Reformatted set_partner() and deleted the disabled code --- FICS/variable.c | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) (limited to 'FICS/variable.c') diff --git a/FICS/variable.c b/FICS/variable.c index 777d3e3..2ed19a5 100644 --- a/FICS/variable.c +++ b/FICS/variable.c @@ -556,37 +556,16 @@ PUBLIC int com_partner(int p, param_list param) return COM_OK; } -PRIVATE int set_partner(int p, char *var, char *val) +PRIVATE int +set_partner(int p, char *var, char *val) { -#if 0 - int p1 = parray[p].partner; - - if (!val) { - RePartner (p, -1); - return VAR_OK; - } - if (!printablestring(val)) - return VAR_BADVAL; - stolower(val); - p1 = player_find_part_login(val); - if (p1 < 0 || parray[p1].status == PLAYER_PASSWORD - || parray[p1].status == PLAYER_LOGIN) { - pprintf(p, "No user named \"%s\" is logged in.\n", val); - return VAR_OK; - } - if (p1 == p) { - pprintf(p, "You can't be your own bughouse partner!\n"); - return VAR_OK; - } - parray[p].partner = p1; - pprintf(p, "Your bughouse partner is now %s.\n", parray[p1].name); - pprintf_prompt(p1, "%s just chose you for a bughouse partner.\n", parray[p].name); -#endif - if (!val) - pprintf(p, "Command is obsolete; type \"partner\" to clear your partner\n"); - else - pprintf(p, "Command is obsolete; type \"partner %s\" to change your partner\n", val); - return VAR_OK; + if (!val) + pprintf(p, "Command is obsolete; type \"partner\" to clear " + "your partner\n"); + else + pprintf(p, "Command is obsolete; type \"partner %s\" to " + "change your partner\n", val); + return VAR_OK; } PRIVATE int -- cgit v1.2.3