AmendHub

Download

jcs

/

wallops

/

settings.h

 

(View History)

jcs   *: Implement selective ignoring of certain events like joins and quits Latest amendment: 80 on 2024-09-11

1 /*
2 * Copyright (c) 2021 joshua stein <jcs@jcs.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #ifndef __SETTINGS_H__
18 #define __SETTINGS_H__
19
20 #include "stdint.h"
21
22 #define SETTINGS_FILENAME "\pWallops Preferences"
23 #define SETTINGS_FILE_CREATOR 'WLOP'
24
25 #define SETTINGS_DLOG_ID 129
26 #define SETTINGS_SERVER_ID 2
27 #define SETTINGS_PORT_ID 3
28 #define SETTINGS_PASSWORD_ID 4
29 #define SETTINGS_NICK_ID 5
30 #define SETTINGS_IDENT_ID 6
31 #define SETTINGS_REALNAME_ID 7
32 #define SETTINGS_HIDE_MOTD_ID 8
33 #define SETTINGS_CHANNEL_ID 9
34
35 #define DEFAULT_SERVER_NAME "irc.libera.chat"
36 #define DEFAULT_PORT "6667"
37 #define DEFAULT_IDENT "wallops"
38 #define DEFAULT_REALNAME "A Macintosh User"
39 #define DEFAULT_CHANNEL "#cyberpals"
40 #define DEFAULT_HIDE_MOTD "0"
41
42 struct settings {
43 short version;
44 #define SETTINGS_VERSION 1
45 char server[64];
46 unsigned short port;
47 char password[32];
48 char nick[32];
49 char ident[32];
50 char realname[32];
51 char channel[32];
52 unsigned char hide_motd;
53 unsigned long ignores;
54 };
55
56 extern struct settings settings;
57
58 bool settings_load(void);
59 void settings_save(struct settings *tsettings);
60 bool settings_edit(bool use_defaults);
61
62 #endif