Modularise handling of DCC offers
There's several different types of DCC offers, all of which need slightly different handling. Previously they were all handled by the monster function register_dcc_type() - this breaks them out into seperate functions for handling SEND, RESEND, CHAT and BOT offers, moves common code into static helper functions and renames the entry point from ctcp.c to handle_dcc_offer(). This will allow adding a way for modules to register DCC offer types that they're interested in. This also moves rename_file() from misc.c into dcc.c, where its only user is.
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
void dcc_bot_transmit(char *, char *, char *);
|
||||
void dcc_raw_transmit(char *, char *, char *);
|
||||
|
||||
void register_dcc_type(char *, char *, char *, char *, char *, char *, char *, char *, void (*func)(int));
|
||||
void handle_dcc_offer(char *, char *, char *, char *, char *, char *, char *, char *);
|
||||
|
||||
void dcc_reject(char *, char *, char *);
|
||||
char *dcc_raw_connect(char *, unsigned short);
|
||||
|
||||
Reference in New Issue
Block a user