diff options
author | June McEnroe <june@causal.agency> | 2021-05-19 18:05:31 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-05-19 18:05:31 -0400 |
commit | 21b5983bfbebf24da5b62c1dab8ce96e76e07d43 (patch) | |
tree | 3a43ce50c2601f6e0550e95ca3f6793a49ccecee /server.c | |
parent | Replace freenode with tilde.chat (diff) | |
download | scooper-1.2.tar.gz scooper-1.2.zip |
Add -h flag to hide user hostnames 1.2
Diffstat (limited to '')
-rw-r--r-- | server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server.c b/server.c index 6cb0611..6280b4d 100644 --- a/server.c +++ b/server.c @@ -87,16 +87,18 @@ int main(int argc, char *argv[]) { const char *val; if ((val = getenv(ENV "DATABASE"))) path = val; if ((val = getenv(ENV "GAP"))) eventsGap = strtol(val, NULL, 10); + if ((val = getenv(ENV "HIDE_HOST"))) htmlHideHost = (val[0] != '0'); if ((val = getenv(ENV "LIMIT"))) eventsLimit = strtol(val, NULL, 10); if ((val = getenv(ENV "OVERLAP"))) eventsOverlap = strtol(val, NULL, 10); if ((val = getenv(ENV "PUBLIC"))) contextsPublic = (val[0] != '0'); if ((val = getenv(ENV "RECENT"))) contextsRecent = strtol(val, NULL, 10); if ((val = getenv(ENV "STYLESHEET"))) htmlStylesheet = val; - for (int opt; 0 < (opt = getopt(argc, argv, "cg:l:o:pr:s:"));) { + for (int opt; 0 < (opt = getopt(argc, argv, "cg:hl:o:pr:s:"));) { switch (opt) { break; case 'c': test = true; break; case 'g': eventsGap = strtol(optarg, NULL, 10); + break; case 'h': htmlHideHost = true; break; case 'l': eventsLimit = strtol(optarg, NULL, 10); break; case 'o': eventsOverlap = strtol(optarg, NULL, 10); break; case 'p': contextsPublic = true; |