Export dcc_chat_socketread() and dcc_send_socketread() callbacks to modules
The idea here is that if you have a module which implements a new DCC type that is essentially a lightly-modified version of CHAT or SEND you can reuse these functions.
This commit is contained in:
@@ -142,8 +142,6 @@ typedef struct _DCC_List
|
||||
|
||||
static DCC_List *pending_dcc = NULL;
|
||||
|
||||
|
||||
static void dcc_chat_socketread(int);
|
||||
#ifndef BITCHX_LITE
|
||||
static void dcc_bot_socketread(int);
|
||||
#endif
|
||||
@@ -767,7 +765,7 @@ void (*func)(int) = dcc_chat_socketread;
|
||||
#define DCC_CTCP_MESSAGE "CTCP_MESSAGE "
|
||||
#define DCC_CTCP_REPLY "CTCP_REPLY "
|
||||
|
||||
static void dcc_chat_socketread(int s)
|
||||
void BX_dcc_chat_socketread(int s)
|
||||
{
|
||||
unsigned long flags;
|
||||
char tmp[BIG_BUFFER_SIZE+1];
|
||||
@@ -1098,7 +1096,6 @@ static const char *dcc_type_name(int type, int tdcc)
|
||||
return dcc_types[type]->name;
|
||||
}
|
||||
|
||||
void dcc_send_socketread(int s);
|
||||
void start_dcc_get(int s);
|
||||
|
||||
/* dcc_fullname()
|
||||
@@ -1796,7 +1793,7 @@ void close_dcc_file(int snum)
|
||||
* following 3 functions process dcc filesends.
|
||||
*/
|
||||
|
||||
void dcc_send_socketread(int snum)
|
||||
void BX_dcc_send_socketread(int snum)
|
||||
{
|
||||
SocketList *s;
|
||||
DCC_int *n;
|
||||
|
||||
@@ -620,6 +620,8 @@ static int already_done = 0;
|
||||
global_table[GET_ACTIVE_COUNT] = (Function_ptr) BX_get_active_count;
|
||||
global_table[DCC_FILESEND] = (Function_ptr) BX_dcc_filesend;
|
||||
global_table[DCC_RESEND] = (Function_ptr) BX_dcc_resend;
|
||||
global_table[DCC_CHAT_SOCKETREAD] = (Function_ptr) BX_dcc_chat_socketread;
|
||||
global_table[DCC_SEND_SOCKETREAD] = (Function_ptr) BX_dcc_send_socketread;
|
||||
|
||||
/* cdcc.c */
|
||||
global_table[GET_NUM_QUEUE] = (Function_ptr) BX_get_num_queue;
|
||||
|
||||
Reference in New Issue
Block a user