diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-24 18:09:59 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-24 18:09:59 +0100 |
commit | 206654a9199f0e3068a67935671c4ff9020ccc71 (patch) | |
tree | 71007053a7385474df9055c11fecd98969f7df5a /FICS/variable.c | |
parent | d045a41d3185b56867fd1cc8475a70fa5031bd46 (diff) |
set_seek: added code
Diffstat (limited to 'FICS/variable.c')
-rw-r--r-- | FICS/variable.c | 17 |
1 files 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; } |