From d7f1c10f41460a77afe3492f31565d4d9cebbb98 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 14 Apr 2024 11:02:45 +0200 Subject: Reformatted com_clearmessages() --- FICS/talkproc.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'FICS/talkproc.c') diff --git a/FICS/talkproc.c b/FICS/talkproc.c index 699173a..739b908 100644 --- a/FICS/talkproc.c +++ b/FICS/talkproc.c @@ -710,24 +710,27 @@ PUBLIC int com_messages(int p, param_list param) return COM_OK; } -PUBLIC int com_clearmessages(int p, param_list param) +PUBLIC int +com_clearmessages(int p, param_list param) { - int start; + int start; - if (player_num_messages(p) <= 0) { - pprintf(p, "You have no messages.\n"); - return COM_OK; - } - if (param[0].type == TYPE_NULL) { - pprintf(p, "Messages cleared.\n"); - player_clear_messages(p); - } else if (param[0].type == TYPE_WORD) { - ClearMsgsBySender(p, param); - } else if (param[0].type == TYPE_INT) { - start = param[0].val.integer; - ClrMsgRange (p, start, start); - } - return COM_OK; + if (player_num_messages(p) <= 0) { + pprintf(p, "You have no messages.\n"); + return COM_OK; + } + + if (param[0].type == TYPE_NULL) { + pprintf(p, "Messages cleared.\n"); + player_clear_messages(p); + } else if (param[0].type == TYPE_WORD) { + ClearMsgsBySender(p, param); + } else if (param[0].type == TYPE_INT) { + start = param[0].val.integer; + ClrMsgRange(p, start, start); + } + + return COM_OK; } PUBLIC int -- cgit v1.2.3