From dda96fced0146ecadd099fd57275f69055e540bc Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 14 Apr 2024 11:05:29 +0200 Subject: Reformatted com_messages() --- FICS/talkproc.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'FICS/talkproc.c') 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 -- cgit v1.2.3