Typedefs | |
typedef void(* | irc_dcc_callback_t )(irc_session_t *session, irc_dcc_t id, int status, void *ctx, const char *data, unsigned int length) |
A common DCC callback, used to inform you about the current DCC state or event. | |
Functions | |
int | irc_dcc_chat (irc_session_t *session, void *ctx, const char *nick, irc_dcc_callback_t callback, irc_dcc_t *dccid) |
Initiates a DCC CHAT. | |
int | irc_dcc_msg (irc_session_t *session, irc_dcc_t dccid, const char *text) |
Sends the message to the specific DCC CHAT. | |
int | irc_dcc_accept (irc_session_t *session, irc_dcc_t dccid, void *ctx, irc_dcc_callback_t callback) |
Accepts a remote DCC CHAT or DCC RECVFILE request. | |
int | irc_dcc_decline (irc_session_t *session, irc_dcc_t dccid) |
Declines a remote DCC CHAT or DCC RECVFILE request. | |
int | irc_dcc_sendfile (irc_session_t *session, void *ctx, const char *nick, const char *filename, irc_dcc_callback_t callback, irc_dcc_t *dccid) |
Sends a file via DCC. | |
int | irc_dcc_destroy (irc_session_t *session, irc_dcc_t dccid) |
Destroys a DCC session. |
|
A common DCC callback, used to inform you about the current DCC state or event.
For DCC CHAT, the callback is called in next circumstances:
For DCC SEND, while file is sending, callback called in next circumstances:
For DCC RECV, while file is sending, callback called in next circumstances:
|
|
Accepts a remote DCC CHAT or DCC RECVFILE request.
This function should be called only after either event_dcc_chat_req or event_dcc_send_req events are generated, and should react to them. It is possible not to call irc_dcc_accept or irc_dcc_decline immediately in callback function - you may just return, and call it later. However, to prevent memory leaks, you must call either irc_dcc_decline or irc_dcc_accept for any incoming DCC request.
|
|
Initiates a DCC CHAT.
When the chat is accepted, terminated, or some data is received, the callback function is called. See the details in irc_dcc_callback_t declaration. Possible error responces for this command from the RFC1459:
|
|
Declines a remote DCC CHAT or DCC RECVFILE request.
This function should be called only after either event_dcc_chat_req or event_dcc_send_req events are generated, and should react to them. It is possible not to call irc_dcc_accept or irc_dcc_decline immediately in callback function - you may just return, and call it later. However, to prevent memory leaks, you must call either irc_dcc_decline or irc_dcc_accept for any incoming DCC request. Do not use this function to close the accepted or initiated DCC session. Use irc_dcc_destroy instead.
|
|
Destroys a DCC session.
Note that when DCC session is finished (either with success or failure), you should not destroy it - it will be destroyed automatically. |
|
Sends the message to the specific DCC CHAT.
|
|
Sends a file via DCC.
Possible error responces for this command from the RFC1459:
|