chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mktemp is (1) Essential: yes and (2) not in dapper (which has it in
[disorder]
/
clients
/
disorder.c
diff --git
a/clients/disorder.c
b/clients/disorder.c
index 3413791fd6fb5b108faf2ee97c4dd7a14b4dff7a..fa42558dd59ed838b6c5050a6fbfa9eeb81a621c 100644
(file)
--- a/
clients/disorder.c
+++ b/
clients/disorder.c
@@
-1,6
+1,6
@@
/*
* This file is part of DisOrder.
/*
* This file is part of DisOrder.
- * Copyright (C) 2004
, 2005, 2006, 2007
Richard Kettlewell
+ * Copyright (C) 2004
-2008
Richard Kettlewell
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-53,6
+53,7
@@
#include "defs.h"
#include "authorize.h"
#include "vector.h"
#include "defs.h"
#include "authorize.h"
#include "vector.h"
+#include "version.h"
static disorder_client *client;
static disorder_client *client;
@@
-84,13
+85,6
@@
static void help(void) {
exit(0);
}
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
static disorder_client *getclient(void) {
if(!client) {
if(!(client = disorder_new(1))) exit(EXIT_FAILURE);
static disorder_client *getclient(void) {
if(!client) {
if(!(client = disorder_new(1))) exit(EXIT_FAILURE);
@@
-467,6
+461,8
@@
static void cf_setup_guest(char **argv) {
default: fatal(0, "invalid option");
}
}
default: fatal(0, "invalid option");
}
}
+ if(online_registration && !config->mail_sender)
+ fatal(0, "you MUST set mail_sender if you want online registration");
if(disorder_adduser(getclient(), "guest", "",
online_registration ? "read,register" : "read"))
exit(EXIT_FAILURE);
if(disorder_adduser(getclient(), "guest", "",
online_registration ? "read,register" : "read"))
exit(EXIT_FAILURE);
@@
-616,11
+612,11
@@
int main(int argc, char **argv) {
pcre_malloc = xmalloc;
pcre_free = xfree;
if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
pcre_malloc = xmalloc;
pcre_free = xfree;
if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
- while((n = getopt_long(argc, argv, "hVc:dHlNu:p:", options, 0)) >= 0) {
+ while((n = getopt_long(argc, argv, "
+
hVc:dHlNu:p:", options, 0)) >= 0) {
switch(n) {
case 'h': help();
case 'H': help_commands();
switch(n) {
case 'h': help();
case 'H': help_commands();
- case 'V': version();
+ case 'V': version(
"disorder"
);
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'l': local = 1; break;
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'l': local = 1; break;