]> PatchyGit - patchyircd.git/commitdiff
make irc hostname configurable
authorEgor <egor@patchysicp.xyz>
Thu, 19 Oct 2023 09:20:23 +0000 (12:20 +0300)
committerEgor <egor@patchysicp.xyz>
Thu, 19 Oct 2023 09:20:23 +0000 (12:20 +0300)
config.h
irc.c

index 5245c54..b59079f 100644 (file)
--- a/config.h
+++ b/config.h
@@ -8,3 +8,6 @@
 #ifndef ADMINEMAIL
 #define ADMINEMAIL "admin@example.com"
 #endif
+#ifndef IRCDHOSTNAME
+#define IRCDHOSTNAME "example.com"
+#endif
diff --git a/irc.c b/irc.c
index 17c367d..71164b3 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -8,7 +8,7 @@ struct trie_node *client_map = NULL;
 struct trie_node *channel_map = NULL;
 struct trie_node *autojoin = NULL;
 
-const char *hostname = "irc.patchysicp.xyz";
+const char *hostname = IRCDHOSTNAME;
 #define is_registered(cl) ((cl)->regstate == REG_REGISTERED)
 void sendbuf(struct client_data *client) {
        sendClient(client, databuf.buf, databuf.len);