From c660db6c36ce50e2aa1c3ec99cb62d9aaf3c0102 Mon Sep 17 00:00:00 2001 From: Test_User Date: Tue, 8 Aug 2023 03:25:57 -0400 Subject: User lists for channels and such --- network.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'network.h') diff --git a/network.h b/network.h index 67d308d..7682ed4 100644 --- a/network.h +++ b/network.h @@ -30,12 +30,13 @@ #include #include +#include #include "types.h" #include "table.h" // ID is the index you got this from -struct remote_server { +struct server_info { uint64_t distance; // gl if you exceed this struct string address; @@ -69,6 +70,9 @@ struct user_info { struct channel_info { uint64_t ts; + struct string topic; + uint64_t topic_ts; + struct table modes; // TODO: Parse modes properly struct table user_list; // points to corresponding user_info struct (if available, currently not) @@ -93,6 +97,15 @@ extern int resolve(char* address, char* port, struct sockaddr *server); extern int initservernetwork(void); extern int initclientnetwork(void); +#define MODE_TYPE_UNKNOWN 0 +#define MODE_TYPE_NOARGS 1 +#define MODE_TYPE_REPLACE 2 +#define MODE_TYPE_MULTIPLE 3 +// Mode goes away when the user leaves the channel +#define MODE_TYPE_USERS 4 + +extern char channel_mode_types[UCHAR_MAX]; + #define SENDCLIENT(x) write(client_fd, x.data, x.len) extern int PRIVMSG(struct string source, struct string target, struct string message); -- cgit v1.2.3