From 8983cde1c4cab47a610c20325ec7a3025efaf31e Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 24 Nov 2024 13:30:51 +0100 Subject: Added command 'sought' --- FICS/build.mk | 1 + FICS/command_list.h | 2 ++ FICS/sought.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ FICS/sought.h | 11 +++++++++++ 4 files changed, 55 insertions(+) create mode 100644 FICS/sought.cpp create mode 100644 FICS/sought.h diff --git a/FICS/build.mk b/FICS/build.mk index 3dad928..0c36314 100644 --- a/FICS/build.mk +++ b/FICS/build.mk @@ -30,6 +30,7 @@ OBJS = $(SRC_DIR)adminproc.o\ $(SRC_DIR)ratings.o\ $(SRC_DIR)rmalloc.o\ $(SRC_DIR)shutdown.o\ + $(SRC_DIR)sought.o\ $(SRC_DIR)talkproc.o\ $(SRC_DIR)utils.o\ $(SRC_DIR)variable.o\ diff --git a/FICS/command_list.h b/FICS/command_list.h index 4cccd20..8d8969f 100644 --- a/FICS/command_list.h +++ b/FICS/command_list.h @@ -40,6 +40,7 @@ #include "rating_conv.h" #include "ratings.h" #include "shutdown.h" +#include "sought.h" #include "talkproc.h" extern command_type command_list[]; @@ -156,6 +157,7 @@ PUBLIC command_type command_list[] = { {"simpass", "", com_simpass, ADMIN_USER}, {"simprev", "", com_simprev, ADMIN_USER}, {"smoves", "wi", com_smoves, ADMIN_USER}, + {"sought", "o", com_sought, ADMIN_USER}, {"sposition", "ww", com_sposition, ADMIN_USER}, {"statistics", "", com_statistics, ADMIN_USER}, {"stored", "o", com_stored, ADMIN_USER}, diff --git a/FICS/sought.cpp b/FICS/sought.cpp new file mode 100644 index 0000000..b4dd282 --- /dev/null +++ b/FICS/sought.cpp @@ -0,0 +1,41 @@ +// SPDX-FileCopyrightText: 2024 Markus Uhlin +// SPDX-License-Identifier: ISC + +#include "stdinclude.h" +#include "common.h" + +#include "sought.h" + +/* + * Usage: sought [all] + * + * The "sought" command can be used in two ways: (a) typing "sought + * all" will display all current ads including your own; (b) typing + * "sought" alone will display only those current ads for which you + * are eligible based on any formula you might have (default). An + * example output is as follows: + * + * 0 1900 Hawk blitz 5 0 rated 1800-2000 f + * 1 1700 Friar wild7 2 12 unrated [white] 0-9999 + * 4 1500 loon standard 5 0 unrated 0-9999 m + * + * The various columns have this information: + * + * Ad index number + * Player's rating + * Player's handle + * Type of chess match + * Time at start + * Increment per move + * Rated/unrated + * Color (if specified) + * Rating range + * Auto start/manual start and whether formula will be checked + */ +PUBLIC int +com_sought(int p, param_list param) +{ + UNUSED_PARAM(p); + UNUSED_PARAM(param); + return COM_OK; +} diff --git a/FICS/sought.h b/FICS/sought.h new file mode 100644 index 0000000..873435c --- /dev/null +++ b/FICS/sought.h @@ -0,0 +1,11 @@ +#ifndef COM_SOUGHT_H +#define COM_SOUGHT_H + +#include "command.h" /* param_list */ +#include "common.h" + +__FICS_BEGIN_DECLS +int com_sought(int, param_list); +__FICS_END_DECLS + +#endif -- cgit v1.2.3