summary refs log tree commit diff
path: root/ircd.h
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2026-02-04 12:21:47 +0300
committerNakidai <nakidai@disroot.org>2026-02-04 12:21:47 +0300
commitce0f41da41a2d97d4a8e7159747464ecef72de4c (patch)
tree7e09329f15932710eb9fc14d18053c812c55515f /ircd.h
parent58a7e4a4d7449d58732e024ea07ea3623c10d8de (diff)
downloadlibreircd-ce0f41da41a2d97d4a8e7159747464ecef72de4c.tar.gz
libreircd-ce0f41da41a2d97d4a8e7159747464ecef72de4c.zip
Add WHOIS and config parsing
Now users can query each other

Plus, server info and creation date can be changed without recompiling
using configuration file in IRC message format which is loaded on
startup

TODO: since readcfg uses IRC logic, handle() now should be able to deal
with commands ending with simply \n
Diffstat (limited to 'ircd.h')
-rw-r--r--ircd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ircd.h b/ircd.h
index 0cde9e0..1f5bba8 100644
--- a/ircd.h
+++ b/ircd.h
@@ -38,7 +38,7 @@ struct Message
 struct Peer
 {
 	int fd;
-	enum ClientType { UNREGD, CLIENT, SERVER, SERVICE } type;
+	enum ClientType { UNREGD, CLIENT, CONFIG, SERVER, SERVICE } type;
 	char nick[PEER_NICK_MAX], user[PEER_USER_MAX], real[PEER_REAL_MAX], host[PEER_HOST_MAX];
 	struct Channel *channels[PEER_CHANNELS_MAX];
 	enum PeerStatus {
@@ -80,6 +80,10 @@ extern size_t channels_c, peers_c;
 extern const char *hostname;
 extern const char *host;
 extern unsigned long port;
+extern char creation[CREATION_MAX];
+extern char info[INFO_MAX];
+
+int readcfg(const char *path);
 
 const char *getnick(const struct Peer *peer);
 enum PeerMode user_mode(char m);