diff options
author | Test_User <hax@andrewyu.org> | 2024-06-15 18:35:19 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-06-15 18:35:19 -0400 |
commit | 98040ca35a29172701adf32c95e6d15392ec5fd1 (patch) | |
tree | db51f5aba9e3cdacd8a636faf19758538a9bf60e /protocols.h | |
parent | 4876b376c4eed926e4500b9f2cd1a3b8bfde554f (diff) | |
download | haxircd-98040ca35a29172701adf32c95e6d15392ec5fd1.tar.gz haxircd-98040ca35a29172701adf32c95e6d15392ec5fd1.zip |
Start of InspIRCd v3 support
Diffstat (limited to 'protocols.h')
-rw-r--r-- | protocols.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/protocols.h b/protocols.h index 915bb96..61836bd 100644 --- a/protocols.h +++ b/protocols.h @@ -30,6 +30,7 @@ #include "haxstring.h" #include "general_network.h" +#include "protocol_numbers.h" #include "server_network.h" struct protocol { @@ -60,13 +61,25 @@ struct protocol { void (*do_unlink)(struct string from, struct server_info *a, struct server_info *b); }; -#ifdef USE_HAXIRCD_PROTOCOL -#define HAXIRCD_PROTOCOL 0 -#endif -#ifdef USE_INSPIRCD2_PROTOCOL -#define INSPIRCD2_PROTOCOL 1 -#endif +int protocols_init(void); -#define NUM_PROTOCOLS 2 +void protocols_update_propagations(void); + +void protocols_propagate_new_server(struct string from, struct string attached_to, struct server_info *info); +void protocols_propagate_unlink_server(struct string from, struct server_info *a, struct server_info *b, size_t protocol); + +void protocols_propagate_new_user(struct string from, struct user_info *info); +void protocols_propagate_rename_user(struct string from, struct user_info *info, struct string nick, size_t timestamp, struct string timestamp_str); +void protocols_propagate_remove_user(struct string from, struct user_info *info, struct string reason); +void protocols_propagate_kill_user(struct string from, struct string source, struct user_info *info, struct string reason); +void protocols_propagate_oper_user(struct string from, struct user_info *info, struct string type); + +void protocols_propagate_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users); +void protocols_propagate_join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users); +void protocols_propagate_part_channel(struct string from, struct channel_info *channel, struct user_info *user, struct string reason); +void protocols_propagate_kick_channel(struct string from, struct string source, struct channel_info *channel, struct user_info *user, struct string reason); + +void protocols_propagate_privmsg(struct string from, struct string source, struct string target, struct string msg); +void protocols_propagate_notice(struct string from, struct string source, struct string target, struct string msg); extern struct protocol protocols[NUM_PROTOCOLS]; |