diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-01 21:33:35 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-01 21:33:35 +0100 |
commit | ad93cd4e7052d40a91180450522ed58a71c909ea (patch) | |
tree | a12bd92639a74df368f78f8f1b57e1baab388827 /FICS | |
parent | c794d29dab5814acffb0af37fc84cfc8cc507fb0 (diff) |
Reformatted com_getpi()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/comproc.c | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c index 4f4a1cb..2c794a3 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -1715,27 +1715,31 @@ PUBLIC int com_handles(int p, param_list param) return COM_OK; } -PUBLIC int com_getpi(int p, param_list param) +PUBLIC int +com_getpi(int p, param_list param) { - int p1; + int p1; - if (!in_list(p, L_TD, parray[p].name)) { - pprintf(p, "Only TD programs are allowed to use this command.\n"); - return COM_OK; - } - if (((p1 = player_find_bylogin(param[0].val.word)) < 0) || (parray[p1].registered == 0)) { - /* Darkside suggested not to return anything */ - return COM_OK; - } - if (!parray[p1].registered) { - pprintf(p, "*getpi %s -1 -1 -1*\n", parray[p1].name); - } else { - pprintf(p, "*getpi %s %d %d %d*\n", parray[p1].name, - parray[p1].w_stats.rating, - parray[p1].b_stats.rating, - parray[p1].s_stats.rating); - } - return COM_OK; + if (!in_list(p, L_TD, parray[p].name)) { + pprintf(p, "Only TD programs are allowed to use this command." + "\n"); + return COM_OK; + } + + if ((p1 = player_find_bylogin(param[0].val.word)) < 0 || + parray[p1].registered == 0) + return COM_OK; + + if (!parray[p1].registered) { + pprintf(p, "*getpi %s -1 -1 -1*\n", parray[p1].name); + } else { + pprintf(p, "*getpi %s %d %d %d*\n", parray[p1].name, + parray[p1].w_stats.rating, + parray[p1].b_stats.rating, + parray[p1].s_stats.rating); + } + + return COM_OK; } PUBLIC int |