mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +02:00
DCC cleanups - split DCC_REC to CHAT|GET|SEND_DCC_RECs. Plugins should
now be able to add whatever new DCC types. Nick changes affect DCC chats. /WHOIS without parameters works properly in DCC CHAT queries. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1194 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
118f9a11eb
commit
e4f7d55ce9
20 changed files with 1398 additions and 912 deletions
|
|
@ -3,7 +3,36 @@
|
|||
|
||||
#include "dcc.h"
|
||||
|
||||
DCC_REC *dcc_chat_find_id(const char *id);
|
||||
#define DCC_CHAT(dcc) \
|
||||
MODULE_CHECK_CAST_MODULE(dcc, CHAT_DCC_REC, type, "DCC", "CHAT")
|
||||
|
||||
#define IS_DCC_CHAT(dcc) \
|
||||
(DCC_CHAT(dcc) ? TRUE : FALSE)
|
||||
|
||||
struct CHAT_DCC_REC {
|
||||
#include "dcc-rec.h"
|
||||
|
||||
char *id; /* unique identifier - usually same as nick. */
|
||||
NET_SENDBUF_REC *sendbuf;
|
||||
|
||||
unsigned int mirc_ctcp:1; /* Send CTCPs without the CTCP_MESSAGE prefix */
|
||||
unsigned int connection_lost:1; /* other side closed connection */
|
||||
};
|
||||
|
||||
#define DCC_CHAT_TYPE module_get_uniq_id_str("DCC", "CHAT")
|
||||
|
||||
CHAT_DCC_REC *dcc_chat_find_id(const char *id);
|
||||
|
||||
/* Send `data' to dcc chat. */
|
||||
void dcc_chat_send(CHAT_DCC_REC *dcc, const char *data);
|
||||
|
||||
/* Send a CTCP message/notify to target.
|
||||
Send the CTCP via DCC chat if `chat' is specified. */
|
||||
void dcc_ctcp_message(IRC_SERVER_REC *server, const char *target,
|
||||
CHAT_DCC_REC *chat, int notice, const char *msg);
|
||||
|
||||
/* If `item' is a query of a =nick, return DCC chat record of nick */
|
||||
CHAT_DCC_REC *item_get_dcc(WI_ITEM_REC *item);
|
||||
|
||||
void dcc_chat_init(void);
|
||||
void dcc_chat_deinit(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue