summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-12 20:56:55 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-12 20:56:55 +0100
commite18e670f43f0e7b126f209c040126aa02511fa32 (patch)
tree798e297304c0ce051847359ebf32af63503b67c8 /config.h
parent34836ab2c9124e17d80bd8e8a1601398297391a8 (diff)
Completely rewrite configuration file reading to remove lots of duplicated code and to simplify things. Alter everything that called the old functions.
Diffstat (limited to 'config.h')
-rw-r--r--config.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/config.h b/config.h
index 156d8ad..3e96c19 100644
--- a/config.h
+++ b/config.h
@@ -7,12 +7,19 @@
#define MAXCHAR 1000
-int readnames(char *nick, char *username, char *realname);
+// Sets 'dest' to the value of the configuration option with name
+// 'confname' from configuration file 'filename'.
+// Returns 1 for success or 0 for error/failure as per what
+// getconfstr() returns.
+int getconfstr(char *confname, char *filename, char* dest);
-int confreplayseconds();
+// Returns the avlue of the configuration option with name
+// 'confname' from configuration file 'filename'.
+int getconfint(char *confname, char *filename);
-int checkpassword(char *password);
-
-int confclientport(char *port);
+// Check the password provided in the string 'str' against what is in
+// the configuration file 'filename'.
+// Return 0 for password mismatch, or 1 for password match.
+int checkpassword(char *password, char *filename);
#endif