From e4b5445b3ca844e568a84abbf931a026a6ca6226 Mon Sep 17 00:00:00 2001 From: Test_User Date: Wed, 3 May 2023 22:57:53 -0400 Subject: C HaxServ --- network.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 network.h (limited to 'network.h') diff --git a/network.h b/network.h new file mode 100644 index 0000000..7cc4a28 --- /dev/null +++ b/network.h @@ -0,0 +1,39 @@ +#pragma once + +#include + +#include "types.h" +#include "table.h" + +// ID is the index you got this from +struct remote_server { + uint64_t distance; // gl if you exceed this + + struct string address; + struct string name; + struct string via; // netsplit purposes + // TODO: metadata +}; + +struct user_info { + uint64_t nick_ts; + uint64_t user_ts; + + struct string server; + struct string nick; + struct string hostname; + struct string vhost; + struct string ident; + struct string ip; + struct string realname; + struct string opertype; + + struct table metadata; +}; + +extern struct table network_commands; +extern struct table server_list; +extern struct table user_list; + +int resolve(char* address, char* port, struct sockaddr *server); +int initservernetwork(void); -- cgit v1.2.3