From 206654a9199f0e3068a67935671c4ff9020ccc71 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 24 Nov 2024 18:09:59 +0100 Subject: set_seek: added code --- FICS/variable.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/FICS/variable.c b/FICS/variable.c index ec397b3..e004eca 100644 --- a/FICS/variable.c +++ b/FICS/variable.c @@ -135,9 +135,20 @@ set_ropen(int p, char *var, char *val) PRIVATE int set_seek(int p, char *var, char *val) { - UNUSED_PARAM(p); - UNUSED_PARAM(var); - UNUSED_PARAM(val); + int v = set_boolean_var(&parray[p].seek, val); + + if (v < 0) + return VAR_BADVAL; + + pprintf(p, "seek set to %d.\n", parray[p].seek); + + if (v > 0) { + pprintf(p, "You will be informed of seek ads when they are " + "made.\n"); + } else { + pprintf(p, "You are no longer receiving seek ads.\n"); + } + return VAR_OK; } -- cgit v1.2.3