diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-04-14 11:05:29 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-04-14 11:05:29 +0200 |
commit | dda96fced0146ecadd099fd57275f69055e540bc (patch) | |
tree | eabb5eee0bb237e538342bf8cf132bc5e10dba4f /FICS/talkproc.c | |
parent | d7f1c10f41460a77afe3492f31565d4d9cebbb98 (diff) |
Reformatted com_messages()
Diffstat (limited to 'FICS/talkproc.c')
-rw-r--r-- | FICS/talkproc.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/FICS/talkproc.c b/FICS/talkproc.c index 739b908..e0b24ae 100644 --- a/FICS/talkproc.c +++ b/FICS/talkproc.c @@ -688,26 +688,30 @@ PUBLIC int com_sendmessage(int p, param_list param) return COM_OK; } -PUBLIC int com_messages(int p, param_list param) +PUBLIC int +com_messages(int p, param_list param) { - int start; - /* int end = -1; */ + int start; - if (!parray[p].registered) { - pprintf (p, "Unregistered players may not send or receive messages.\n"); - return COM_OK; - } - if (param[0].type == TYPE_NULL) { - player_show_messages (p); - } else if (param[0].type == TYPE_WORD) { - if (param[1].type != TYPE_NULL) - return com_sendmessage(p, param); - else ShowMsgsBySender(p, param); - } else { - start = param[0].val.integer; - ShowMsgRange (p, start, start); - } - return COM_OK; + if (!parray[p].registered) { + pprintf(p, "Unregistered players may not send or receive " + "messages.\n"); + return COM_OK; + } + + if (param[0].type == TYPE_NULL) { + player_show_messages (p); + } else if (param[0].type == TYPE_WORD) { + if (param[1].type != TYPE_NULL) + return com_sendmessage(p, param); + else + ShowMsgsBySender(p, param); + } else { + start = param[0].val.integer; + ShowMsgRange(p, start, start); + } + + return COM_OK; } PUBLIC int |