Subversion Repositories IRCServ

Rev

Rev 2 | Rev 5 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 3
Line 1... Line 1...
1
/* $Id: check.c 2 2024-08-25 10:11:51Z nishi $ */
1
/* $Id: check.c 3 2024-08-25 10:23:36Z nishi $ */
2
 
2
 
3
#include "config.h"
3
#include "config.h"
4
 
4
 
5
#include <stdio.h>
5
#include <stdio.h>
6
 
6
 
Line 25... Line 25...
25
		printf("Using %s for logging\n", name);
25
		printf("Using %s for logging\n", name);
26
		return 0;
26
		return 0;
27
	}
27
	}
28
}
28
}
29
 
29
 
-
 
30
int check_irc(void){
-
 
31
	int st = 0;
-
 
32
#ifndef IRC_SERVER
-
 
33
	fprintf(stderr, "Set a server IP\n");
-
 
34
	st = 1;
-
 
35
#endif
-
 
36
#ifndef IRC_PORT
-
 
37
	fprintf(stderr, "Set a server port\n");
-
 
38
	st = 1;
-
 
39
#endif
-
 
40
#ifndef IRC_SECRET
-
 
41
	fprintf(stderr, "Set a service password\n");
-
 
42
	st = 1;
-
 
43
#endif
-
 
44
#ifndef IRC_SERVICE
-
 
45
	fprintf(stderr, "Set a service name\n");
-
 
46
	st = 1;
-
 
47
#endif
-
 
48
	return st;
-
 
49
}
-
 
50
 
30
int main() {
51
int main() {
31
	int st = 0;
52
	int st = 0;
32
	st = check_log();
53
	st = check_log();
33
	if(st != 0) goto cleanup;
54
	if(st != 0) goto cleanup;
-
 
55
	st = check_irc();
-
 
56
	if(st != 0) goto cleanup;
34
cleanup:
57
cleanup:
35
	return st;
58
	return st;
36
}
59
}