summaryrefslogtreecommitdiffstats
path: root/src/daemon/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/settings.c')
-rw-r--r--src/daemon/settings.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/daemon/settings.c b/src/daemon/settings.c
index 4392300..c537510 100644
--- a/src/daemon/settings.c
+++ b/src/daemon/settings.c
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define _GNU_SOURCE
+
+#include <string.h>
+#include <errno.h>
#include "settings.h"
#include "settings_private.h"
@@ -31,6 +35,10 @@ void settings_init(void)
unset_flag(flag_daemonize);
settings.port = 6996;
settings.verboselevel = USURP_VERBOSITY;
+ settings.progname = program_invocation_short_name;
+ settings.im_user = "user";
+ settings.im_password = "password";
+ settings.im_proto = "prpl-irc";
}
int setting_detach(void)
@@ -48,6 +56,26 @@ unsigned short int setting_port(void)
return settings.port;
}
+char *setting_progname(void)
+{
+ return strdup(settings.progname);
+}
+
+char *setting_im_user(void)
+{
+ return strdup(settings.im_user);
+}
+
+char *setting_im_password(void)
+{
+ return strdup(settings.im_password);
+}
+
+char *setting_im_proto(void)
+{
+ return strdup(settings.im_proto);
+}
+
/* could be a one-liner, but let's make the logic more obvious */
int test_flag(unsigned int flag)
{